Re: [PATCH v4 7/8] worktree: add relative cli/config options to `repair` command
- From
Caleb White <cdwhite3@pm.me>
- Date
- Nov 26, 2024, 00:00 UTC
- Message-ID
- <D5VO2YCU3DM3.2DS3BX0F0NDW6@pm.me>
- In-Reply-To
- <60325a17-82e3-4a4c-a6fd-d3b597f1c2bc@gmail.com>
On Sun Nov 24, 2024 at 1:27 PM CST, phillip.wood123 wrote:
Show 9 quoted lines
> On 23/11/2024 05:41, Caleb White wrote: >> Yes, there is an edge case that a file is written with the same (correct) >> contents, but I think this is acceptable given that it would be more >> complicated to check if the contents are the same before writing (which >> would involve reading the file). > > That's fine - it might be worth explaining it in the commit message > though (the same goes for the other patches where we start writing both > files instead of one).
I can make a note of it in the commit messages.
Show 14 quoted lines
>>> This works because strbuf_realpath() copies dotgit.buf before it resets >>> dotgit but that does not seem to be documented and looking at the output of >>> >>> git grep strbuf_realpath | grep \\.buf >>> >>> I don't see any other callers relying on this outside of your earlier >>> changes to this file. Given that I wonder if we should leave it as is >>> which would also simplify this patch as the interesting changes are >>> swamped by the strbuf tweaking. >> >> I'd like to keep this if that's okay. > > Let's leave it as is and see what Junio thinks - my worry is that if > strbuf_realpath() gets refactored in the future it could break this code.
The tests will catch any breakages during a refactor, so I'm not too worried about that.
Best,
Caleb