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

Re: [PATCH v3/RFC] Remove the use of '--' in merge program invocation

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 17, 2008, 00:05 UTC
Message-ID
<7vlk157woq.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1213659221-27519-1-git-send-email-patrick.higgins@cexp.com>
Patrick Higgins <patrick.higgins@cexp.com> writes:
Show 18 quoted lines
> Put a "./" at the beginning of all paths given to the merge program so
> that filenames beginning with a '-' character don't get interpreted as
> options.
>
> This deals with a problem where kdiff3 can be compiled with or without
> support for the '--' separator between options and filenames.
>
> Signed-off-by: Patrick Higgins <patrick.higgins@cexp.com>
> ---
>
> This is applying Junio's idea because my earlier attempts would fail on files
> that started with a dash. This should work for those files with kdiff3
> compiled with or without '--' support, does not require any additional
> overhead to determine if kdiff3 has that support, and the technique should
> work for all merge programs in case any others have the problem kdiff3 has.
>
> My only concern is if 'git ls-files -u' ever returns absolute paths,
> then this will not work.

What do you mean by "absolute paths"? The path git proper deals with is always relative to the root of the repository's work tree, so you won't be seeing "/home/patrick/src/Makefile" from ls-files if that is what you are worried about.

This change applies to all the backends not just kdiff3; people who use different merge backends please give success (or breakage) reports.

Thanks.
Previous: Patrick HigginsNext: patrick.higgins@cexp.com
Message 2 of 3 in “Remove the use of '--' in merge program invocation”
  1. Remove the use of '--' in merge program invocationPatrick Higgins, Jun 16, 2008
  2. Junio C HamanoJun 17, 2008
  3. patrick.higgins@cexp.comJun 17, 2008

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.