git-annex-update-index-modified

This commit is contained in:
neingeist 2025-08-27 00:23:41 +02:00
parent d23a13bb93
commit 21b373abac

12
git-annex-update-index-modified Executable file
View file

@ -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])