Web lists-archives.com

Re: [PATCH] t5404: relax overzealous test

On Fri, Apr 06, 2018 at 09:31:22PM +0200, Johannes Schindelin wrote:

> In 0b294c0abf0 (make deleting a missing ref more quiet, 2008-07-08), we
> added a test to verify that deleting an already-deleted ref does not
> show an error.

Amazing that it took this long to come up.

> Suppose, however, that you are a big fan of whales. Or even better: your
> IT administrator has a whale of a time picking cute user names, e.g.
> referring to you (due to your like of India Pale Ales) as "one of the
> cuter rorquals" (see https://en.wikipedia.org/wiki/Rorqual to learn a
> thing or two about rorquals) and hence your home directory becomes
> /home/cuterrorqual. If you now run t5404, it fails! Why? Because the
> test calls `git push origin :b3` which outputs:
>     To /home/cuterrorqual/git/t/trash directory.t5404-tracking-branches/.
>      - [deleted]         b3

This is from the same Dscho who complains about the length of some of my
commit messages, right? ;P

> This patch chooses instead to look for the prefix "error:" at the
> beginning of the line, so that there can be no ambiguity that any catch
> was indeed a message generated by Git's `error_builtin()` function.

Yep, this seems obviously correct.

Right now we do not localize the "error" string, but I wonder if this
ought to use test_i18ngrep. With or without that change, the patch looks
good to me.