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

Re: [PATCH v8 4/7] bisect: introduce --no-checkout, --update-ref=<ref> support into porcelain.

From
Christian Couder <chriscool@tuxfamily.org>
Date
Jul 31, 2011, 20:05 UTC
Message-ID
<201107312205.57488.chriscool@tuxfamily.org>
In-Reply-To
<CAH3Anrp+Jynon0O8mQJnKvCNtp0v6oR9pLetmg0B6GnoP2QWMg@mail.gmail.com>
On Sunday 31 July 2011 21:48:40 you wrote:
> On Mon, Aug 1, 2011 at 4:35 AM, Christian Couder
> 
> <christian.couder@gmail.com> wrote:
> > On Sun, Jul 31, 2011 at 1:55 PM, Jon Seymour <jon.seymour@gmail.com> 
wrote:
Show 23 quoted lines
> >> @@ -69,13 +71,18 @@ bisect_start() {
> >>        orig_args=$(git rev-parse --sq-quote "$@")
> >>        bad_seen=0
> >>        eval=''
> >> +       BISECT_UPDATE_REF=
> >>        while [ $# -gt 0 ]; do
> >>            arg="$1"
> >>            case "$arg" in
> >>            --)
> >> -               shift
> >> -               break
> >> -               ;;
> >> +               shift; break ;;
> > 
> > Please don't change this. We try to avoid having many instructions on
> > the same line like this.
> 
> Sure.
> 
> FWIW: there are two places in git-am.sh and git-repack.sh that put shift on
> the same line as another statement,. Also this:
> 
>      case "$arg" in --) has_double_dash=1; break ;; esac
Yeah, we are not always consistent.
> However, 'fixing' those can be another change, assessed on its own merits.
Yeah, but I don't think it's worth it at least for the line above.
Show 13 quoted lines
> >> +           --no-checkout)
> >> +               BISECT_UPDATE_REF=HEAD; shift ;;
> > 
> > Perhaps:
> > 
> >                   test -z "$BISECT_UPDATE_REF" && BISECT_UPDATE_REF=HEAD
> > 
> > so that "--update-ref=someref --no-checkout" works the same as
> > "--no-checkout --update-ref=someref".
> 
> Got the intent, thanks.
> 
>  How about BISECT_UPDATE_REF=${BISECT_UPDATE_REF:-HEAD}?
Yeah, nice.

Thanks, Christian.

Previous: Jon SeymourNext: Christian Couder
Message 8 of 17 in “bisect: Add support for --no-checkout and --update-ref=<ref> options.”
  1. 0/7 bisect: Add support for --no-checkout and --update-ref=<ref> options.Jon Seymour, Jul 31, 2011
  2. 1/7 bisect: move argument parsing before state modification.Jon Seymour, Jul 31, 2011
  3. 2/7 bisect: add tests to document expected behaviour in presence of broken trees.Jon Seymour, Jul 31, 2011
  4. 3/7 bisect: introduce support for --update-ref=<ref> option.Jon Seymour, Jul 31, 2011
  5. 4/7 bisect: introduce --no-checkout, --update-ref=<ref> support into porcelain.Jon Seymour, Jul 31, 2011
  6. Christian CouderJul 31, 2011
  7. Jon SeymourJul 31, 2011
  8. Christian CouderJul 31, 2011
  9. Christian CouderJul 31, 2011
  10. Jon SeymourJul 31, 2011
  11. Christian CouderJul 31, 2011
  12. Christian CouderJul 31, 2011
  13. Jon SeymourJul 31, 2011
  14. 5/7 bisect: add tests for the --no-checkout and --update-ref options.Jon Seymour, Jul 31, 2011
  15. 6/7 bisect: add documentation for --no-checkout and --update-ref=<ref> options.Jon Seymour, Jul 31, 2011
  16. 7/7 bisect: support --update-ref <ref>Jon Seymour, Jul 31, 2011
  17. Jon SeymourJul 31, 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.