git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v17 1/7] bisect: move argument parsing before state modification.

From
Johannes Sixt <j6t@kdbg.org>
Date
Sep 7, 2011, 18:07 UTC
Message-ID
<4E67B2F2.9070806@kdbg.org>
In-Reply-To
<201109070816.16655.chriscool@tuxfamily.org>
Am 07.09.2011 08:16, schrieb Christian Couder:
Show 19 quoted lines
> If we start bisecting like this:
> 
> $ git bisect start HEAD HEAD~20
> 
> and then we decide that it was not optimum and we want to start again like 
> this:
> 
> $ git bisect start HEAD HEAD~6
> 
> then issuing the latter command might not work as it did before this patch.
>  
> Before this patch the latter command would do a "git checkout $start_head" 
> before the repeated rev=$(git rev-parse -q --verify "$arg^{commit}") to 
> convert arguments into sha1. And after this patch the order is reversed.
> 
> This means that before this patch "HEAD" in the arguments to "git bisect 
> start" would refer to $start_head because the "git checkout $start_head" 
> changes HEAD. After this patch "HEAD" in the arguments to "git bisect start" 
> would refer to the current HEAD.

But isn't this an improvement? HEAD denotes the current head. After the first 'bisect start HEAD HEAD~20', HEAD is somewhere in the middle, not the original HEAD anymore; I would *expect* that a different commit is checked out if I just repeat the command.

IOW, I think the new behavior is *much* better than the old behavior.
-- Hannes
Previous: Junio C HamanoNext: Jon Seymour
Message 5 of 12 in “bisect: Add support for --no-checkout option”
  1. 0/7 bisect: Add support for --no-checkout optionJon Seymour, Aug 4, 2011
  2. 1/7 bisect: move argument parsing before state modification.Jon Seymour, Aug 4, 2011
  3. Christian CouderSep 7, 2011
  4. Junio C HamanoSep 7, 2011
  5. Johannes SixtSep 7, 2011
  6. Jon SeymourSep 8, 2011
  7. 2/7 bisect: use && to connect statements that are deferred with eval.Jon Seymour, Aug 4, 2011
  8. 3/7 bisect: add tests to document expected behaviour in presence of broken trees.Jon Seymour, Aug 4, 2011
  9. 4/7 bisect: introduce support for --no-checkout option.Jon Seymour, Aug 4, 2011
  10. 5/7 bisect: introduce --no-checkout support into porcelain.Jon Seymour, Aug 4, 2011
  11. 6/7 bisect: add tests for the --no-checkout option.Jon Seymour, Aug 4, 2011
  12. 7/7 bisect: add documentation for --no-checkout option.Jon Seymour, Aug 4, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.