new_branch="$3"
if [ "$new_branch" = 1 ]; then
- commit_date="`git show --format='%cD' -s`" &&
+ commit_date="`git show --pretty=tformat:'%cD' -s`" &&
find . \( -name .git -type d -prune \) -o \
-exec touch --date="$commit_date" '{}' \+
fi
new_branch="$3"
if [ "$new_branch" = 1 ]; then
- commit_date="`git show --format='%cD' -s`" &&
+ commit_date="`git show --pretty=tformat:'%cD' -s`" &&
touch --date="$commit_date" `git diff --name-only HEAD~`
fi
new_branch="$3"
if [ "$new_branch" = 1 ]; then
- commit_date="`git show --format='%cD' -s`" &&
+ commit_date="`git show --pretty=tformat:'%cD' -s`" &&
touch --date="$commit_date" `git ls-files --cached`
fi
# and set the file's modification time to that date/time.
git ls-tree -r --name-only HEAD | while read filename; do
- touch --date="`git log -1 --format=\"%cD\" -- \"$filename\"`" "$filename"
+ touch --date="`git log -1 --pretty=tformat:\"%cD\" -- \"$filename\"`" "$filename"
done
git_log = subprocess.Popen(['git', 'log', '-m', '--first-parent',
'--name-status', '--no-color',
- '--format=%s%%n%%%st' % (separator, date_format)],
+ '--pretty=tformat:%s%%n%%%st' % (
+ separator, date_format)],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
universal_newlines=True)
changed_files = set()