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

Rename conflicts in the index

From
Edward Thomson <ethomson@microsoft.com>
Date
Mar 13, 2013, 14:08 UTC
Message-ID
<A54CE3E330039942B33B670D971F857403995D93@TK5EX14MBXC252.redmond.corp.microsoft.com>

When a rename conflict occurs, the information about the conflict is written to stdout and the index is updated as if the conflict were a simpler conflict that did not involve renames. This doesn't give a lot of information to users after the fact - a status of "added in ours" does not provide a lot of details about what occurred.

In reimplementations, we face a similar challenge. Unfortunately, we can't simply print the output to the console, we would like to provide this information back to the caller by some mechanism. My preference would be to return this information in the index - so that the results of "unpack trees" (if you will) was a single data structure (the index) and so that we could persist this information to disk. I've been considering the idea of an extension that contains more detailed data about conflicts, but I certainly wouldn't want to proceed without discussing this here further.

I would propose that we store the data about the file in conflict as it occurred through the renames. For example, in a rename 1->2 conflict where A was renamed to both B and C, you would have a single conflict entry containing the data for A, B and C. This would allow us to provide more detailed information to the user - and allow them to (say) choose a single name to proceed with.

Is this something that has value to core git as well? Alternately, is there something particularly stupid about this proposal?

Thanks- -ed

Next: Junio C Hamano
Message 1 of 16 in “Rename conflicts in the index”
  1. Edward ThomsonMar 13, 2013
  2. Junio C HamanoMar 13, 2013
  3. Edward ThomsonMar 13, 2013
  4. Edward ThomsonMar 26, 2013
  5. Junio C HamanoMar 26, 2013
  6. Edward ThomsonMar 26, 2013
  7. Edward ThomsonMar 27, 2013
  8. Junio C HamanoMar 27, 2013
  9. Edward ThomsonMar 27, 2013
  10. Junio C HamanoMar 27, 2013
  11. Edward ThomsonApr 1, 2013
  12. Edward ThomsonApr 2, 2013
  13. Junio C HamanoApr 2, 2013
  14. Edward ThomsonApr 2, 2013
  15. Junio C HamanoApr 3, 2013
  16. Junio C HamanoApr 3, 2013

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.