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

Re: [PATCHv2 0/3] Fix unnecessary (mtime) updates of files during merge

From
Elijah Newren <newren@gmail.com>
Date
Mar 2, 2011, 23:11 UTC
Message-ID
<AANLkTinuK=VbNVNraBnxoMHrDvSh-W7+QBEbOJWQaC=y@mail.gmail.com>
In-Reply-To
<20110301193142.GA10082@sigill.intra.peff.net>
Hi,
Thanks for all the feedback.

On Tue, Mar 1, 2011 at 12:31 PM, Jeff King <peff@peff.net> wrote: ...

> As you mention, this second testcase is not a regression at all, and
> while it would be great if we could avoid touching those files at all, I
> don't think anybody will be too upset at files being rewritten that were
> actually involved in the conflict.

Well, technically they weren't involved in a conflict. One side had an unmodified directory of files, the other side removed that directory and just put a file there. Someone starts the merge on the side that only has a file there. There's no conflict, but we update the file.

Still, it's a lot better than erroring out and claiming there was a conflict, so it's still an improvement over what we had.

Show 6 quoted lines
> I think the fix you have for the first testcase is reasonable. It feels
> a little like a band-aid, as we are throwing away stat information early
> on and then pulling it again from the filesyste at the end. But from
> your description, the real fix to that would probably involve some
> changes to the way unpack_trees works, and that's probably complex
> enough that the band-aid is a good fix for now.

I agree, it does seem like a bit of a band-aid, but as you say I was worried about the complexity of changing unpack_trees and wanted a good interim fix. Of course, Junio's point about deleted-as-unmodified files might be sticky enough that we have to start looking at such alternatives or do something more. We'll have to see what he says.

Previous: Jeff KingNext: Junio C Hamano
Message 13 of 14 in “[PATCHv2 0/3] Fix unnecessary (mtime) updates of files during merge”
  1. Elijah NewrenMar 1, 2011
  2. 1/3 t6022: New test checking for unnecessary updates of renamed+modified filesElijah Newren, Mar 1, 2011
  3. Johannes SixtMar 1, 2011
  4. Jeff KingMar 1, 2011
  5. Elijah NewrenMar 2, 2011
  6. 2/3 t6022: New test checking for unnecessary updates of files in D/F conflictsElijah Newren, Mar 1, 2011
  7. 3/3 merge-recursive: When we detect we can skip an update, actually skip itElijah Newren, Mar 1, 2011
  8. Junio C HamanoMar 2, 2011
  9. Elijah NewrenMar 2, 2011
  10. Junio C HamanoMar 2, 2011
  11. Jeff KingMar 1, 2011
  12. Jeff KingMar 1, 2011
  13. Elijah NewrenMar 2, 2011
  14. Junio C HamanoMar 2, 2011

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.