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

Re: [PATCH v3] merge-ll: expose revision names to custom drivers

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Jan 20, 2024, 18:23 UTC
Message-ID
<7dbe4006-bfc2-402e-8073-870d7ec38319@gmail.com>
In-Reply-To
<xmqqsf2rgb39.fsf@gitster.g>
Hi Junio
On 20/01/2024 17:37, Junio C Hamano wrote:
Show 8 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
> 
>> Not part of this patch but I noticed that we're passing the filenames
>> for '%A' etc. unquoted which is a bit scary.
> 
> May be scary but safe, as long as create_temp() gives a reasonable
> temporary filename.  We pass ".merge_file_XXXXXX" to xmkstemp(),
> which calls into mkstemp(), which should give us a shell safe name?

Yes. I'd mis-read create_temp() and thought we were appending ".merge_file_XXXXX" to the path being merged but looking at it again it is safe.

Show 5 quoted lines
> It also should be a safe conversion to change strbuf_addstr() used
> for these three to sq_quote_buf(), as the string with these %[OAB]
> placeholders are passed to the shell that eats the quoting before
> invoking the end-user supplied external merge driver, which means
> the merge driver would not notice any difference.
I agree that would be a safe conversion , but I'm not sure it is worth it.
Best Wishes
Phillip
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 15 in “merge-ll: expose revision names to custom drivers”
  1. merge-ll: expose revision names to custom driversAntonin Delpeuch via GitGitGadget, Jan 18, 2024
  2. Kristoffer HaugsbakkJan 18, 2024
  3. Antonin DelpeuchJan 18, 2024
  4. merge-ll: expose revision names to custom driversAntonin Delpeuch via GitGitGadget, Jan 18, 2024
  5. Junio C HamanoJan 18, 2024
  6. Antonin DelpeuchJan 18, 2024
  7. merge-ll: expose revision names to custom driversAntonin Delpeuch via GitGitGadget, Jan 18, 2024
  8. Antonin DelpeuchJan 19, 2024
  9. Junio C HamanoJan 20, 2024
  10. Phillip WoodJan 20, 2024
  11. Junio C HamanoJan 20, 2024
  12. Phillip WoodJan 20, 2024
  13. Junio C HamanoJan 20, 2024
  14. merge-ll: expose revision names to custom driversAntonin Delpeuch via GitGitGadget, Jan 24, 2024
  15. Junio C HamanoJan 24, 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.