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

Re: [PATCH v2] bisect reset: Allow resetting to any commit, not just a branch

From
Christian Couder <chriscool@tuxfamily.org>
Date
Oct 13, 2009, 20:30 UTC
Message-ID
<200910132230.04498.chriscool@tuxfamily.org>
In-Reply-To
<alpine.DEB.2.00.0910131605170.5105@dr-wily.mit.edu>
On Tuesday 13 October 2009, Anders Kaseorg wrote:
Show 16 quoted lines
> On Tue, 13 Oct 2009, Christian Couder wrote:
> > +       1) git rev-parse --quiet --verify "$1^{commit}" > /dev/null ||
> > +               die "'$1' does not seem to point to a valid commit"
> >
> > It would give a better error message when "git rev-parse" fails instead
> > of:
> >
> > fatal: Needed a single revision
> >
> > and it would not print the SHA1 from "$1^{commit}" when "git rev-parse"
> > succeeds.
>
> Oh, oops, I somehow lost the > /dev/null in my version.
>
> But as for the ‘git rev-parse’ error being confusing, why don’t we fix
> ‘git rev-parse’ instead?

It's a plumbing command, and the output of plumbing commands is not supposed to change a lot as some scripts may rely on it.

And anyway that would be in another patch.

Best regards, Christian.

Previous: Anders KaseorgNext: Anders Kaseorg
Message 11 of 18 in “bisect reset: Allow resetting to any commit, not just a branch”
  1. bisect reset: Allow resetting to any commit, not just a branchAnders Kaseorg, Oct 12, 2009
  2. Junio C HamanoOct 12, 2009
  3. Anders KaseorgOct 12, 2009
  4. Junio C HamanoOct 12, 2009
  5. Johannes SixtOct 13, 2009
  6. Junio C HamanoOct 13, 2009
  7. Anders KaseorgOct 13, 2009
  8. bisect reset: Allow resetting to any commit, not just a branchAnders Kaseorg, Oct 13, 2009
  9. Christian CouderOct 13, 2009
  10. Anders KaseorgOct 13, 2009
  11. Christian CouderOct 13, 2009
  12. bisect reset: Allow resetting to any commit, not just a branchAnders Kaseorg, Oct 13, 2009
  13. Junio C HamanoOct 14, 2009
  14. Johannes SixtOct 13, 2009
  15. Junio C HamanoOct 13, 2009
  16. Johannes SixtOct 13, 2009
  17. Junio C HamanoOct 13, 2009
  18. Anders KaseorgOct 13, 2009

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.