✨ git-annex-update-index-modified
This commit is contained in:
parent
d23a13bb93
commit
21b373abac
1 changed files with 12 additions and 0 deletions
12
git-annex-update-index-modified
Executable file
12
git-annex-update-index-modified
Executable 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])
|
Loading…
Add table
Add a link
Reference in a new issue