From: Stephen Boyd <bebarino@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Thomas Adam <thomas.adam22@gmail.com>,
Johannes Sixt <j.sixt@viscovery.net>
Subject: Re: [PATCHv3 4/4] am, rebase: teach quiet option
Date: Tue, 16 Jun 2009 00:50:05 -0700 [thread overview]
Message-ID: <4A374EAD.9030309@gmail.com> (raw)
In-Reply-To: <7vbpoog1py.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Hmm, this long conditional body looks ugly, and I suspect it is harder to
> maintain than necessary. Can we do something about it?
>
> # When we are allowed to fall back to 3-way later, don't give
> # false errors during the initial attempt.
> squelch=
> if test "$threeway" = t && test -n "$GIT_QUIET"
> then
> squelch='>/dev/null 2>&1 '
> fi
> eval "git apply $squelch$git_apply_opt"' --index "$dotest/patch"'
>
Thanks. I thought there would be a nicer way but I didn't know it.
> Ah, I was blind.
>
> While sending non-error messages to stderr is justifiable, I do not think
> this one is, because all the other progress-y message in this program we
> reviewed so far go to stdout. I think we should drop >&2 here.
Will do, gotta fixup some tests for that though...
> There is one more thing to think about in git-am, which I do not think you
> addressed. Consider this scenario.
>
> (1) Tell am to run quietly, feeding a four-patch series.
>
> $ git am -q -3 mbox
>
> (2) The first patch applies cleanly; the second one does not apply,
> even with -3, and leaves conflict (you did the right thing not to
> squelch the message when this happens).
>
> (3) You fix it up, and save the result from your editor, and tell it
> to continue.
>
> $ git am --resolved
>
> Now, should the second invocation be also quiet, or talkative as default?
>
> Note that the third and fourth patch are applied with -3 option in effect,
> even though you did not say -3 when you restarted "am" with --resolved
> (cf. ll.280-340 in git-am.sh).
Thanks for bringing this up. I gave this some thought before I sent the
series out but I was secretly hoping nobody would care :-) I think it's
more correct and maybe even more consistent to keep the quiet option
enabled.
Seeing as this series is going for round 4 I'll make sure to include
this as well.
next prev parent reply other threads:[~2009-06-16 7:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 2:05 [PATCHv3 0/4] Teach shell scripts to be quiet Stephen Boyd
2009-06-16 2:05 ` [PATCHv3 1/4] t4150: test applying with a newline in subject Stephen Boyd
2009-06-16 2:05 ` [PATCHv3 2/4] git-sh-setup: introduce say() for quiet options Stephen Boyd
2009-06-16 2:05 ` [PATCHv3 3/4] submodule, repack: migrate to git-sh-setup's say() Stephen Boyd
2009-06-16 2:05 ` [PATCHv3 4/4] am, rebase: teach quiet option Stephen Boyd
2009-06-16 5:57 ` Junio C Hamano
2009-06-16 7:50 ` Stephen Boyd [this message]
2009-06-16 5:56 ` [PATCHv3 3/4] submodule, repack: migrate to git-sh-setup's say() Junio C Hamano
2009-06-16 6:18 ` Junio C Hamano
2009-06-16 7:38 ` Stephen Boyd
2009-06-16 8:13 ` [PATCHv3 2/4] git-sh-setup: introduce say() for quiet options Johannes Sixt
2009-06-16 22:32 ` [PATCHv4 0/5] Teach shell scripts to be quiet Stephen Boyd
2009-06-16 22:32 ` [PATCHv4 1/5] t4150: test applying with a newline in subject Stephen Boyd
2009-06-16 22:32 ` [PATCHv4 2/5] am: suppress apply errors when using 3-way Stephen Boyd
2009-06-16 22:32 ` [PATCHv4 3/5] git-sh-setup: introduce say() for quiet options Stephen Boyd
2009-06-16 22:33 ` [PATCHv4 4/5] submodule, repack: migrate to git-sh-setup's say() Stephen Boyd
2009-06-16 22:33 ` [PATCHv4 5/5] am, rebase: teach quiet option Stephen Boyd
2009-06-18 1:07 ` [PATCHv4 6/5] stash: " Stephen Boyd
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=4A374EAD.9030309@gmail.com \
--to=bebarino@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=thomas.adam22@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.