git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Sheikh hamza via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Sheikh hamza <sheikhhamza012@gmail.com>
Subject: Re: [PATCH] bisect: remove root directory restriction for git bisect
Date: Mon, 23 Mar 2020 17:02:17 +0100 (CET)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.2003231658450.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20200322104826.GB2224@szeder.dev>

[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]

Hi Gábor,

On Sun, 22 Mar 2020, SZEDER Gábor wrote:

> On Sun, Mar 22, 2020 at 09:15:47AM +0000, Sheikh hamza via GitGitGadget wrote:
> > From: sheikh hamza <sheikhhamza012@gmail.com>
> >
> > the git bisect
> >     command should be able to run from inside any
> >     subdirectory
>
> Why should 'git bisect' be able to run from inside any subdirectory
> (of the working tree, I presume)?

Because other commands also allow the user to run in a subdirectory. For
example, `git rebase`, `git checkout`, `git cherry-pick`, etc

> In particular, what happens, if someone starts 'git bisect' from within
> 'subdir/', and 'git bisect' then checks out an old commit, where said
> 'subdir/' didn't exist?  What happens, if the user runs 'git bisect run
> ./script' from within 'subdir/', and that 'subdir/' doesn't exist in
> that old commit?

The same that happens if that situation arises in `git rebase` or `git
checkout`: the directory is removed unless it is not empty (i.e. if there
are untracked files in the directory, or submodules).

> What happens, if 'subdir' does exists in that old commit, but it's a
> file, not a directory?  What happens, if all this is on Windows?

On Windows, the directory is not deletable, of course, and the same thing
happens as if an untracked file is still in that directory: it is not
deleted.

> >  git-bisect.sh            | 1 +
> >  t/perf/bisect_regression | 6 ++----
> >  2 files changed, 3 insertions(+), 4 deletions(-)

The most obvious problem with this patch is that it is not accompanied by
a regression test that documents and verifies the intended behavior.

Ciao,
Dscho

  parent reply	other threads:[~2020-03-23 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22  9:15 [PATCH] bisect: remove root directory restriction for git bisect Sheikh hamza via GitGitGadget
2020-03-22 10:48 ` SZEDER Gábor
2020-03-22 14:30   ` sheikh hamza
2020-03-22 14:39   ` sheikh hamza
2020-03-22 14:58   ` sheikh hamza
2020-03-23 16:02   ` Johannes Schindelin [this message]
2020-03-23 16:17   ` Junio C Hamano

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.2003231658450.46@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=sheikhhamza012@gmail.com \
    --cc=szeder.dev@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).