mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <>
To: Stefan Beller <>
Cc: Junio C Hamano <>,
	Jonathan Nieder <>,
	"" <>,
	Remi Galan Alfonso <>
Subject: Re: [PATCHv3] checkout: do not mention detach advice for explicit --detach option
Date: Fri, 12 Aug 2016 12:28:25 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Aug 12, 2016 at 08:51:43AM -0700, Stefan Beller wrote:

> > Hmm. Using "!test_cmp" seems weird to me, just because it would falsely
> > claim success if something else unexpected changes. Our usual method for
> > making sure some particular output does not appear is "test_i18ngrep"
> > with a liberal pattern.
> and I advanced the liberal a bit more. ;)
> So maybe we'd be looking that no 'detached HEAD' occurs?
>     test_i18ngrep ! "'detached HEAD'" actual

I was thinking maybe "advice:" to look for any advice, but at this point
we are guessing about what might change in the future.

> I think testing that we do not give out advice (i.e. behave the same as if
> not giving out advice) is best tested to just compare the output to
> the output of "git -c advice.detachedHead=false ...", which is what I do here.
> This seems to be future proof to me no matter how we reword the advice or
> the actual message on checkout?

Yeah, I guess that is reasonable. I thought at first you were comparing
more distinct commands, but if only the one thing is changing, that
seems reasonable.

You may also want to grab stderr, too (I'm actually surprised advice
goes to stdout and not stderr, and that is something that seems
plausible to change in the future).


  reply	other threads:[~2016-08-12 16:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 15:37 [PATCHv3] checkout: do not mention detach advice for explicit --detach option Stefan Beller
2016-08-12 15:43 ` Jeff King
2016-08-12 15:51   ` Stefan Beller
2016-08-12 16:28     ` Jeff King [this message]
2016-08-12 16:12 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).