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

Re: [PATCH] refs: return conflict error when checking packed refs

From
Patrick Steinhardt <ps@pks.im>
Date
May 2, 2024, 12:38 UTC
Message-ID
<ZjOJONdlaINfN_i_@tanuki>
In-Reply-To
<pull.1716.git.git.1714488648294.gitgitgadget@gmail.com>
On Tue, Apr 30, 2024 at 02:50:47PM +0000, Ivan Tse via GitGitGadget wrote:
Show 14 quoted lines
> From: Ivan Tse <ivan.tse1@gmail.com>
> 
> The TRANSACTION_NAME_CONFLICT error code refers to a failure to create a
> ref due to a name conflict with another ref. An example of this is a
> directory/file conflict such as ref names A/B and A.
> 
> "git fetch" uses this error code to more accurately describe the error
> by recommending to the user that they try running "git remote prune" to
> remove any old refs that are deleted by the remote which would clear up
> any directory/file conflicts.
> 
> This helpful error message is not displayed when the conflicted ref is
> stored in packed refs. This change fixes this by ensuring error return
> code consistency in `lock_raw_ref`.

The change itself makes sense to me. But I'd like to see a test that demonstrates the new behaviour so that we don't regress this in the future.

Thanks!
Patrick
Previous: Ivan Tse via GitGitGadgetNext: Ivan Tse via GitGitGadget
Message 2 of 11 in “refs: return conflict error when checking packed refs”
  1. refs: return conflict error when checking packed refsIvan Tse via GitGitGadget, Apr 30, 2024
  2. Patrick SteinhardtMay 2, 2024
  3. refs: return conflict error when checking packed refsIvan Tse via GitGitGadget, May 3, 2024
  4. Patrick SteinhardtMay 3, 2024
  5. refs: return conflict error when checking packed refsIvan Tse via GitGitGadget, May 4, 2024
  6. Patrick SteinhardtMay 6, 2024
  7. Karthik NayakMay 6, 2024
  8. Junio C HamanoMay 6, 2024
  9. Ivan TseMay 7, 2024
  10. Karthik NayakMay 7, 2024
  11. Ivan TseMay 8, 2024

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.