shithub: plan9front

Download patch

ref: 73db7a20f7a3195967d77b972e4eaa5602d2d4bf
parent: aacf368c6d4ec9adb9fae28d3ca07d074fd459f5
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jun 12 10:57:58 EDT 2021

git/add: clear qid cache as side effect

this is an occasionally useful side effect when
doing surgery on repos, so let's have it.

--- a/sys/src/cmd/git/add	Sat Jun 12 10:32:16 2021
+++ b/sys/src/cmd/git/add	Sat Jun 12 10:57:58 2021
@@ -31,9 +31,7 @@
 		# We don't want a matching qid, so that
 		# git/walk doesn't think this came from
 		# a checkout.
-		if(! test -e $addpath)
-			if(~ $add 'tracked' || test -e $gitfs/HEAD/tree/$f)
-				touch $addpath
+		echo -n > $addpath
 		rm -f $delpath
 	}
 }