- if (!is_fast_fwd $upstream, $old_head) {
- snag 'upstream-not-ancestor',
- f_ "upstream (%s) is not an ancestor of HEAD", $upstream;
- } else {
- my $wrong = cmdoutput
- (@git, qw(rev-list --ancestry-path), "$upstream..HEAD",
- qw(-- :/ :!/debian));
- if (length $wrong) {
- snag 'unexpected-upstream-changes', f_
- "history between upstream (%s) and HEAD contains direct changes to upstream files - are you sure this is a gbp (patches-unapplied) branch?",
- $upstream;
- print STDERR f_ "list expected changes with: %s\n",
- "git log --stat --ancestry-path $upstream_spec..HEAD -- :/ ':!/debian'";
+ if (!is_fast_fwd $upstream, $old_head) {
+ snag 'upstream-not-ancestor',
+ f_ "upstream (%s) is not an ancestor of HEAD", $upstream;
+ } else {
+ my $wrong = cmdoutput
+ (@git, qw(rev-list --ancestry-path), "$upstream..HEAD",
+ qw(-- :/ :!/debian));
+ if (length $wrong) {
+ snag 'unexpected-upstream-changes', f_
+ "history between upstream (%s) and HEAD contains direct changes to upstream files - are you sure this is a gbp (patches-unapplied) branch?",
+ $upstream;
+ print STDERR f_ "list expected changes with: %s\n",
+ "git log --stat --ancestry-path $upstream_spec..HEAD -- :/ ':!/debian'";
+ }