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:
11af4ca
)
is_fast_fwd simply returns false if no common history (pursuant to #720896)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 26 Aug 2013 15:35:58 +0000
(16:35 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 26 Aug 2013 15:35:58 +0000
(16:35 +0100)
dgit
patch
|
blob
|
history
diff --git
a/dgit
b/dgit
index a8077a809887596a97172c94a032685ca7a80c90..f582be0e8ee39cd1a0e00275ec6c78d76c2100c3 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-639,8
+639,14
@@
sub rev_parse ($) {
sub is_fast_fwd ($$) {
my ($ancestor,$child) = @_;
sub is_fast_fwd ($$) {
my ($ancestor,$child) = @_;
- my $mb = cmdoutput @git, qw(merge-base), $ancestor, $child;
- return rev_parse($mb) eq rev_parse($ancestor);
+ my @cmd = (@git, qw(merge-base), $ancestor, $child);
+ my $mb = cmdoutput_errok @cmd;
+ if (defined $mb) {
+ return rev_parse($mb) eq rev_parse($ancestor);
+ } else {
+ $?==256 or failedcmd @cmd;
+ return 0;
+ }
}
sub git_fetch_us () {
}
sub git_fetch_us () {