- say "Doing git pull ..." if $verbose;
-
- # if we're the merge base, the ff-only should workkkkkk
- system 'git pull --ff-only' == 0 or die $? >> 8;
- say "$0: re-execute after update";
- chdir $CALLED{cwd} or die "$0: Can't chdir to $CALLED{cwd}: $!\n";
- exec $CALLED{argv0}, @{$CALLED{argv}};
- die "Can't re-exec\n";
+ if ($base ne $local) {
+ warn "$0: the merge base is not local anymore. Refusing to `git pull`\n"
+ }
+ else {
+ # if we're the merge base, the ff-only should work
+ system 'git pull --ff-only' == 0 or die $? >> 8;
+ say "$0: re-execute after update";
+ chdir $CALLED{cwd} or die "$0: Can't chdir to $CALLED{cwd}: $!\n";
+ exec $CALLED{argv0}, @{$CALLED{argv}};
+ die "Can't re-exec\n";
+ }