git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: phillip.wood@dunelm.org.uk
Cc: Sangeeta via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Sangeeta <sangunb09@gmail.com>
Subject: Re: [PATCH][OUTREACHY] bisect: allow `git bisect` to run from subdirectory
Date: Thu, 22 Oct 2020 10:47:13 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.2010221042260.56@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <2f71d0c4-a5de-c22b-9cbe-a9efcb3cd21d@gmail.com>

Hi Phillip,

On Wed, 21 Oct 2020, Phillip Wood wrote:

> Hi Sangeeta
>
> It's great to see you tackling another patch
>
> On 21/10/2020 10:09, Sangeeta via GitGitGadget wrote:
> > From: Sangeeta Jain <sangunb09@gmail.com>
> >
> > As `git rebase` was never prevented to run from subdirectory we shouldn't
> > prevent `git bisect` to run from subdirectories.
>
> I'm not sure it's relevant to bisect whether or not rebase can be run from a
> subdirectory.

The relevance is this: _iff_ we want to prevent `git bisect` from running
in a subdirectory under the premise that that subdirectory might need to
be removed, then why don't we prevent `git rebase` from running in a
subdirectory when that command is equally likely to remove that
subdirectory?

> What is important is that we want all commands to be able to be run from
> a subdirectory unless there is a good reason not to (and there isn't for
> bisect)

There is a difference in quality here, though. If you run, say, `git
fetch` in a subdirectory, or `git commit` or `git show`, there is not the
same worry that that subdirectory will go away as with `git bisect`, `git
rebase`, `git switch`, `git pull` and other commands.

> I'd recommend adding [Outreachy] to the beginning of the first line of
> the commit message as well.

I am opposed to that. The fact that this comes in via Outreachy is
interesting at the moment, for reviewers, but not for posterity (i.e. in
the commit that will make it into the commit history).

> > diff --git a/git-bisect.sh b/git-bisect.sh
> > index ea7e684ebb..9cd0fa0483 100755
> > --- a/git-bisect.sh
> > +++ b/git-bisect.sh
> > @@ -32,6 +32,7 @@ git bisect run <cmd>...
> >   Please use "git help bisect" to get the full man page.'
> >
> >   OPTIONS_SPEC=
> > +SUBDIRECTORY_OK=Yes
> >   . git-sh-setup
>
> `git bisect run` takes an optional script that is run to determine if the
> current commit is good or bad. If the script is given with a relative path
> then we need to make sure it is invoked from the subdirectory that `git bisect
> run` was started from. As far as I can see git-bisect.sh does not change
> directory but it would be good to have a test for `git bisect run <cmd>` from
> a subdirectory.

That's a very good point. We should first add a regression test for
exactly that use case, and then make sure that it passes.

Ciao,
Dscho

  parent reply	other threads:[~2020-10-22  8:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  9:09 [PATCH] bisect: allow `git bisect` to run from subdirectory Sangeeta via GitGitGadget
2020-10-21 13:41 ` [PATCH][OUTREACHY] " Phillip Wood
2020-10-21 16:20   ` Taylor Blau
2020-10-21 19:53     ` Junio C Hamano
2020-10-22  8:52       ` Johannes Schindelin
2020-10-22  9:46         ` Phillip Wood
2020-10-22 16:52           ` Junio C Hamano
2020-10-23 10:59             ` Sangeeta NB
2020-10-23 15:43               ` Junio C Hamano
2020-10-23 15:18             ` Phillip Wood
2020-10-22  8:47   ` Johannes Schindelin [this message]
2020-10-22  9:52     ` Phillip Wood
2020-10-22 17:04       ` Junio C Hamano
2020-10-23  8:37         ` Johannes Schindelin

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.2010221042260.56@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sangunb09@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).