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

Re: [PATCH amend] git-bisect.sh: don't accidentally override existing branch "bisect"

From
Christian Couder <chriscool@tuxfamily.org>
Date
May 3, 2008, 08:42 UTC
Message-ID
<200805031042.32190.chriscool@tuxfamily.org>
In-Reply-To
<20080502085620.3361.qmail@17e811992e6d42.315fe32.mid.smarden.org>
Le vendredi 2 mai 2008, Gerrit Pape a écrit :
[...]
Show 7 quoted lines
> @@ -328,8 +333,8 @@ bisect_next() {
>  	exit_if_skipped_commits "$bisect_rev"
>
>  	echo "Bisecting: $bisect_nr revisions left to test after this"
> -	git branch -f new-bisect "$bisect_rev"
> -	git checkout -q new-bisect || exit
> +	git branch -D new-bisect
Doesn't this output an error if the branch "new-bisect" does not exists ?

$ git branch -D new-bisect error: branch 'new-bisect' not found.

> +	git checkout -q -b new-bisect "$bisect_rev" || exit
>  	git branch -M new-bisect bisect
>  	git show-branch "$bisect_rev"
>  }

Thanks, Christian.

Previous: Gerrit PapeNext: Gerrit Pape
Message 6 of 11 in “git-bisect.sh: don't accidentally override existing branch "bisect"”
  1. git-bisect.sh: don't accidentally override existing branch "bisect"Gerrit Pape, Apr 30, 2008
  2. Christian CouderApr 30, 2008
  3. Richard QuirkMay 1, 2008
  4. Christian CouderMay 1, 2008
  5. git-bisect.sh: don't accidentally override existing branch "bisect"Gerrit Pape, May 2, 2008
  6. Christian CouderMay 3, 2008
  7. git-bisect.sh: don't accidentally override existing branch "bisect"Gerrit Pape, May 5, 2008
  8. Christian CouderMay 6, 2008
  9. Karl HasselströmMay 2, 2008
  10. Junio C HamanoMay 2, 2008
  11. Johannes SchindelinMay 3, 2008

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.