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

Re: Regression in 'git branch -m'?

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 6, 2017, 09:45 UTC
Message-ID
<xmqqzi94vcd7.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171006083719.jap56jucgmlsuvuo@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> So this patch fixes the problem:
>
> diff --git a/refs.c b/refs.c
> index df075fcd06..2ba74720c8 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -1435,7 +1435,8 @@ const char *refs_resolve_ref_unsafe(struct ref_store *refs,
>  		if (refs_read_raw_ref(refs, refname,
>  				      sha1, &sb_refname, &read_flags)) {
>  			*flags |= read_flags;
> -			if (errno != ENOENT || (resolve_flags & RESOLVE_REF_READING))
> +			if ((errno != ENOENT && errno != EISDIR) ||
> +			    (resolve_flags & RESOLVE_REF_READING))
Ooo, good find--is_missing_file_error() strikes back...
Show 9 quoted lines
>  				return NULL;
>  			hashclr(sha1);
>  			if (*flags & REF_BAD_NAME)
>
> but seems to stimulate a test failure in t3308. I have a suspicion that
> I've just uncovered another bug, but I'll dig in that. In the meantime I
> wanted to post this update in case anybody else was looking into it.
>
> -Peff
Previous: Jeff KingNext: Jeff King
Message 5 of 14 in “Regression in 'git branch -m'?”
  1. Andreas KreyOct 5, 2017
  2. Jeff KingOct 5, 2017
  3. Jeff KingOct 6, 2017
  4. Jeff KingOct 6, 2017
  5. Junio C HamanoOct 6, 2017
  6. Jeff KingOct 6, 2017
  7. Jeff KingOct 6, 2017
  8. 1/2 t3308: create a real ref directory/file conflictJeff King, Oct 6, 2017
  9. 2/2 refs_resolve_ref_unsafe: handle d/f conflicts for writesJeff King, Oct 6, 2017
  10. Michael HaggertyOct 6, 2017
  11. Jeff KingOct 6, 2017
  12. Michael HaggertyOct 7, 2017
  13. Michael HaggertyNov 5, 2017
  14. Junio C HamanoOct 7, 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.