chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
270c257
)
badcommit-fixup: break out $bare
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 5 Jan 2017 17:42:01 +0000
(17:42 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 5 Jan 2017 17:42:01 +0000
(17:42 +0000)
badcommit-fixup
patch
|
blob
|
history
diff --git
a/badcommit-fixup
b/badcommit-fixup
index ca2e0dfbdd28a8f02db50d38cd45244c06464d1b..44c07021f44a3fbdb947be0951345ebff4fe80b5 100755
(executable)
--- a/
badcommit-fixup
+++ b/
badcommit-fixup
@@
-138,12
+138,13
@@
foreach my $rline (split /\n/, $refs) {
push @updates, [ $refname, $obj, $rewrite ];
}
+$!=0; $?=0;
+my $bare = `git rev-parse --is-bare-repository`;
+die "$? $!" if $?;
+
open U, "|git update-ref -m 'dgit bad commit fixup' --stdin" or die $!;
if ($real) {
- $!=0; $?=0;
- my $bare = `git rev-parse --is-bare-repository`;
- die "$? $!" if $?;
if ($bare eq 'false') {
print "detaching your HEAD\n" or die $!;
system 'git checkout --detach' and die "$! $?";