From: Christian Couder <christian.couder@gmail.com> To: Johannes Schindelin <Johannes.Schindelin@gmx.de> Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>, Christian Couder <chriscool@tuxfamily.org>, Miriam Rubio <mirucam@gmail.com> Subject: Re: [PATCH v2] bisect: don't use invalid oid as rev when starting Date: Thu, 24 Sep 2020 13:08:01 +0200 [thread overview] Message-ID: <CAP8UFD3HtiAj2yiHBZOeqm-=VxVeV7mpwvFRV_mV8y-vsxgQUQ@mail.gmail.com> (raw) In-Reply-To: <nycvar.QRO.7.76.6.2009240947080.5061@tvgsbejvaqbjf.bet> Hi Dscho, On Thu, Sep 24, 2020 at 11:59 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote: > On Thu, 24 Sep 2020, Christian Couder wrote: > > - rev=$(git rev-parse -q --verify "$arg^{commit}") || { > > - test $has_double_dash -eq 1 && > > - die "$(eval_gettext "'\$arg' does not appear to be a valid revision")" > > - break > > - } > > - revs="$revs $rev" > > These are awfully long lines. The reason is that you kept the indentation > of the diff. But that's actually not necessary, because we do not need to > apply a diff here; This code snippet is intended purely for human > consumption. > > What I suggested in my adaptation of your patch was to lose the diff > markers and to decrease the insane amount of indentation to just one (and > two) horizontal tabs. Yeah, I didn't realize that. When I am sent some code or patch like this, I often hesitate between: - using it verbatim, which can create issues as it makes me more likely to overlook something in the case the sender didn't fully check everything - looking at the differences with the existing code/patch and applying them one by one, which has the risk of missing or forgetting a difference I guess the best would be to do both and then check the differences between the 2 results, but it feels like twice the amount of work for this step. > > diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh > > index b886529e59..70c39a9459 100755 > > --- a/t/t6030-bisect-porcelain.sh > > +++ b/t/t6030-bisect-porcelain.sh > > @@ -82,6 +82,13 @@ test_expect_success 'bisect fails if given any junk instead of revs' ' > > git bisect bad $HASH4 > > ' > > > > +test_expect_success 'bisect start without -- uses unknown arg as path restriction' ' > > To avoid the overly long line (and also to re-use existing naming > conventions), I replaced "path restrictions" by "pathspecs" here. What do > you think? It's not a huge issue, but I tend to prefer using "restrictions" because the tests that check that these arguments are used properly are called "restricting bisection on one dir" and "restricting bisection on one dir and a file". So I feel that it keeps test names more coherent. Best, Christian.
next prev parent reply other threads:[~2020-09-24 11:08 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-23 17:09 [PATCH] " Christian Couder 2020-09-23 17:27 ` Junio C Hamano 2020-09-23 20:37 ` Johannes Schindelin 2020-09-23 21:05 ` Johannes Schindelin 2020-09-23 21:39 ` Junio C Hamano 2020-09-24 6:10 ` Christian Couder 2020-09-24 6:48 ` Junio C Hamano 2020-09-24 7:51 ` Johannes Schindelin 2020-09-24 16:39 ` Junio C Hamano 2020-09-24 18:38 ` Junio C Hamano 2020-09-25 7:13 ` Johannes Schindelin 2020-09-25 7:14 ` Johannes Schindelin 2020-09-25 16:54 ` Junio C Hamano 2020-09-24 6:03 ` [PATCH v2] " Christian Couder 2020-09-24 7:49 ` Johannes Schindelin 2020-09-24 11:08 ` Christian Couder [this message] 2020-09-24 16:44 ` Junio C Hamano 2020-09-24 18:55 ` Junio C Hamano 2020-09-24 19:25 ` Junio C Hamano 2020-09-24 19:56 ` Junio C Hamano 2020-09-24 20:53 ` Junio C Hamano 2020-09-25 13:09 ` Christian Couder 2020-09-25 13:01 ` [PATCH v3] " Christian Couder
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='CAP8UFD3HtiAj2yiHBZOeqm-=VxVeV7mpwvFRV_mV8y-vsxgQUQ@mail.gmail.com' \ --to=christian.couder@gmail.com \ --cc=Johannes.Schindelin@gmx.de \ --cc=chriscool@tuxfamily.org \ --cc=git@vger.kernel.org \ --cc=gitster@pobox.com \ --cc=mirucam@gmail.com \ --subject='Re: [PATCH v2] bisect: don'\''t use invalid oid as rev when starting' \ /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
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).