summaryrefslogtreecommitdiff
path: root/support/git-set-file-times
diff options
context:
space:
mode:
Diffstat (limited to 'support/git-set-file-times')
-rwxr-xr-xsupport/git-set-file-times5
1 files changed, 3 insertions, 2 deletions
diff --git a/support/git-set-file-times b/support/git-set-file-times
index 51962d37..24b3fde5 100755
--- a/support/git-set-file-times
+++ b/support/git-set-file-times
@@ -27,11 +27,12 @@ def main():
if not args.tree:
# All modified files keep their current mtime.
- proc = subprocess.Popen(git + 'ls-files -m -z'.split(), stdout=subprocess.PIPE, encoding='utf-8')
+ proc = subprocess.Popen(git + 'status -z --no-renames'.split(), stdout=subprocess.PIPE, encoding='utf-8')
out = proc.communicate()[0]
for fn in out.split('\0'):
- if fn == '':
+ if fn == '' or (fn[0] != 'M' and fn[1] != 'M'):
continue
+ fn = fn[3:]
if args.list:
mtime = os.lstat(fn).st_mtime
print_line(fn, mtime, mtime)