9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] git/import: remove removed files from index after commit
@ 2022-10-03 17:33 Michael Forney
  2022-10-07 18:10 ` ori
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Forney @ 2022-10-03 17:33 UTC (permalink / raw)
  To: 9front


Otherwise, they stick around in the index even though they aren't
present in the checkout or the commit. This causes various git tools
to bail out since they think the tree is dirty.
---
diff 606ccb59b11dcdb1bb9235a74cb8b33cc9b81d2c de1315db8636d344f019368e6ae18f447e854773
--- a/sys/src/cmd/git/import
+++ b/sys/src/cmd/git/import
@@ -96,8 +96,10 @@
 		}
 		git/walk -fRMA $files
 		if(~ $#nocommit 0){
-			if(hash=`{git/save -n $aname -e $amail -N $name -E $email -m $msg -d $date $parents $files})
+			if(hash=`{git/save -n $aname -e $amail -N $name -E $email -m $msg -d $date $parents $files}){
 				echo $hash > $refpath
+				rm -f .git/index9/removed/$files
+			}
 		}
 		status=''''
 	'

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] [PATCH] git/import: remove removed files from index after commit
  2022-10-03 17:33 [9front] [PATCH] git/import: remove removed files from index after commit Michael Forney
@ 2022-10-07 18:10 ` ori
  0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2022-10-07 18:10 UTC (permalink / raw)
  To: 9front

Quoth Michael Forney <mforney@mforney.org>:
> 
> Otherwise, they stick around in the index even though they aren't
> present in the checkout or the commit. This causes various git tools
> to bail out since they think the tree is dirty.
> ---

yes please!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-07 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 17:33 [9front] [PATCH] git/import: remove removed files from index after commit Michael Forney
2022-10-07 18:10 ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).