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

Re: BUG: attempt to trim too many characters

From
Jeff King <peff@peff.net>
Date
Sep 5, 2017, 22:03 UTC
Message-ID
<20170905220300.isxbt5y5fd2scd6b@sigill.intra.peff.net>
In-Reply-To
<CA+55aFywhyELmbhAorgTjJZeuNxE-+j2qSP=3d3vqQXNM6p54A@mail.gmail.com>
On Tue, Sep 05, 2017 at 02:55:08PM -0700, Linus Torvalds wrote:
Show 9 quoted lines
> On Tue, Sep 5, 2017 at 2:50 PM, Jeff King <peff@peff.net> wrote:
> >
> > What version of git are you running? This should be fixed by 03df567fbf
> > (for_each_bisect_ref(): don't trim refnames, 2017-06-18) which is in
> > v2.14.
> 
> I'm way more recent than 2.14.
> 
> I'm at commit 238e487ea ("The fifth batch post 2.14")

Ugh. Bitten again by the fact that rev-parse and revision.c implement the same things in subtly different ways.

This probably fixes it:
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 2bd28d3c08..9f24004c0a 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -757,8 +757,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
 				continue;
 			}
 			if (!strcmp(arg, "--bisect")) {
-				for_each_ref_in("refs/bisect/bad", show_reference, NULL);
-				for_each_ref_in("refs/bisect/good", anti_reference, NULL);
+				for_each_fullref_in("refs/bisect/bad", show_reference, NULL, 0);
+				for_each_fullref_in("refs/bisect/good", anti_reference, NULL, 0);
 				continue;
 			}
 			if (opt_with_value(arg, "--branches", &arg)) {
Previous: Linus TorvaldsNext: Linus Torvalds
Message 4 of 9 in “BUG: attempt to trim too many characters”
  1. Linus TorvaldsSep 5, 2017
  2. Jeff KingSep 5, 2017
  3. Linus TorvaldsSep 5, 2017
  4. Jeff KingSep 5, 2017
  5. Linus TorvaldsSep 5, 2017
  6. rev-parse: don't trim bisect refnamesJeff King, Sep 6, 2017
  7. Michael HaggertySep 6, 2017
  8. Linus TorvaldsSep 13, 2017
  9. Jeff KingSep 13, 2017

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.