ref: dcff4acbb68367e69ea6e49aa31aa557c29f3ccf
parent: f3f659b54b9dc7dd6d16c3b25915997c8caa39ed
author: Noam Preil <noam@pixelhero.dev>
date: Sun Sep 22 16:24:16 EDT 2024
git/commit: preserve merge-parents on failed commit
--- a/sys/src/cmd/git/commit
+++ b/sys/src/cmd/git/commit
@@ -78,7 +78,6 @@
if(! ~ $#parents 0)
pflags='-p'^$parents
hash=`{git/save -n $"name -e $"email -m $"msg $pflags $files || die $status}
- rm -f .git/merge-parents
}
fn update{
@@ -86,6 +85,7 @@
# Paranoia: let's not mangle the repo.
if(~ $#hash 0)
die 'botched commit'
+ rm -f .git/merge-parents
echo $branch: $hash
echo $hash > $refpath
for(f in $files){
--
⑨