Sean Whitton writes ("Bug#932476: git-debpush gbp/unapplied upstream tree 
check"):
> Patch attached.
> 
> Based on series in #932459.

Thanks.

> +# ---- Upstream tag tree nonidentical
> +
> +if ! [ "x$upstream_tag" = "x" ] \
> +        && ([ "$quilt_mode" = "gbp" ] \
> +            || [ "$quilt_mode" = "unapplied" ]) \
> +        && git diff-tree --numstat "$upstream_tag" "$branch" \
> +            | grep -qvP "[0-9]+\t[0-9]+\tdebian/"; then
> +    fail_check upstream-nonidentical \
> + "the upstream source in tag $upstream_tag is not identical to the upstream 
> source in $branch"
> +fi

I'm afraid I don't like this very much.

* Can we lead with a case which switches on the quilt mode ?
  That will provide a place to add other checks for other quilt modes.

* Please use the git file selector syntax and git-diff --exit-code
  rather than grepping the output of git diff-tree --numstat.

  You will want to be careful to distinguish exit status 1 meaning
  "different" from other failures, to avoid something like
      git: diff: arrgh, my innards have exploded!
      git-debpush: the upstream source in tag blah is not identical ...
  So set +e, rc=$?; set -e.

* I think in gbp and unapplied quilt modes, $upstream_tag will always
  be set by now (if not, then this code is too early), so don't
  check for that.

* In gbp mode you must tolerate .gitignore differences.

Sorry,
Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.

Reply via email to