From 21b373abaca0ab89674bf4aba2695c7fc3514309 Mon Sep 17 00:00:00 2001 From: neingeist Date: Wed, 27 Aug 2025 00:23:41 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20git-annex-update-index-modified?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git-annex-update-index-modified | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 git-annex-update-index-modified 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])