git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/7] Use 'printf %s $x' notation in t5401
Date: Wed, 30 Jan 2008 22:41:56 -0500	[thread overview]
Message-ID: <20080131034156.GV24004@spearce.org> (raw)
In-Reply-To: <7vbq72hjzo.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
> >> 	printf '%s\n' "$@"
> >
> > Eh.  Since all we care is that the argument count is 0 we probably
> > should be looking at $# and calling it a day.
> 
> I'll apply as-is, but once you break the code that calls
> pre-receive hook in such a way that it sends unexpected
> arguments, you'd thank me for suggesting to print the arguments
> separately while debugging the problem with the test script.

Well, I don't really think it matters.  I doubt we'll break that
code that invokes the pre-receive or post-receive hooks.  And as
those hooks are defined to never take arguments if we did suddenly
start passing arguments we want the test to break.  When tests break
sometimes its not obvious why they have broken.

Case in point, the "remote: " prefixing caused by the sideband
demultiplexer really confused me for about 15 minutes.  I could
not figure out why the last test in this script was failing.
Until I pulled my head out of the sand and looked at the "actual"
file and saw those prefixes.  At which point it was very obvious.

:)

We haven't touched that script in almost a year.  I poked at it only
to fix a stupid error from my printf implementation, and because of
the new "remote:" prefix.  Which since it is a change in behavior may
cause problems for anyone who is trying to screen-scrape the stderr
of git-push.  Gawd I hope nobody's scripts are that convoluted.

-- 
Shawn.

      reply	other threads:[~2008-01-31  3:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30  6:21 [PATCH 1/7] Use 'printf %s $x' notation in t5401 Shawn O. Pearce
2008-01-30  6:40 ` Junio C Hamano
2008-01-30  6:48   ` Shawn O. Pearce
2008-01-31  1:16     ` Junio C Hamano
2008-01-31  3:41       ` Shawn O. Pearce [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20080131034156.GV24004@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.
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 NNTP newsgroup(s).