diff --git a/git-annex-update-index-modified b/git-annex-update-index-modified new file mode 100755 index 0000000..fb772ea --- /dev/null +++ b/git-annex-update-index-modified @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 +import subprocess +import sys + +out = subprocess.check_output(["git", "status", "-zs"]) +for line in out.split(b"\0"): + line = line.decode("UTF-8") + if len(line) >= 2 and line[1] == "M": + pathname = line[3:] + print(pathname) + # XXX stages files... + subprocess.run(["git", "update-index", "--refresh", pathname])