From: Graham Knop Date: Fri, 19 Aug 2016 07:40:44 +0000 (-0400) Subject: be compatible with older git X-Git-Tag: v0.003000~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c5645b6dce3ebc1308814bd2f67e90c987eaaff3;hp=20e3afabd10bc85b57a92da03e7bd678367b85a8;p=p5sagit%2FDistar.git be compatible with older git --- diff --git a/helpers/preflight b/helpers/preflight index 6fdc52e..9e87cbb 100755 --- a/helpers/preflight +++ b/helpers/preflight @@ -28,8 +28,10 @@ $head eq "refs/heads/$branch" chomp(my $upstream = `git for-each-ref --format="%(upstream)" $head`); length $upstream or die "No upstream branch configured for $branch!\n"; -system qw(git merge-base --is-ancestor), $upstream, $head - and die "Not synced with upstream!\n"; +my $base_rev = `git merge-base $upstream $head`; +my $upstream_rev = `git rev-parse --verify $upstream`; +$upstream_rev eq $base_rev + or die "Not synced with upstream!\n"; for (scalar `git diff`) { length && die "Outstanding changes!\n";