Re: [PATCH 4/4] branch: add '--show-description' option
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jan 2, 2018, 10:41 UTC
- Message-ID
- <CAM0VKj=HNvd_wvZMJSGB7hCrjnUj+J+Q17zpbV1ju=rvbDLPrQ@mail.gmail.com>
- In-Reply-To
- <c3937260-1ffd-797b-7f25-53a6a4bf3676@kdbg.org>
On Tue, Jan 2, 2018 at 10:32 AM, Johannes Sixt <j6t@kdbg.org> wrote:
> Am 01.01.2018 um 23:54 schrieb SZEDER Gábor:
Show 25 quoted lines
>> - errors out with a proper error message when the given branch >> doesn't exist (but exits quietly with an error code when the >> branch does exit but has no description, just like the 'git config' >> query does). > > >> +test_expect_success '--show-description with no description errors >> quietly' ' >> + git config --unset branch.master.description && >> + test_must_fail git branch --show-description >actual 2>actual.err >> && >> + test_must_be_empty actual && >> + test_must_be_empty actual.err >> +' > > > Checking the exact contents of stderr typically fails when tests are run > under -x. Perhaps > > test_i18ngrep ! "fatal: " actual.err &&" > test_i18ngrep ! "error: " actual.err && > test_i18ngrep ! "warning: " actual.err > > Which makes me wonder: Why would --show-description have to error out > silently? This is not 'git config' after all.
I figured it would be beneficial if it were a drop-in replacement for the original 'git config' query.
I don't have a strong opinion about this, and certainly wouldn't mind adding an error message instead.
Gábor