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

Re: [PATCH] Allow git-mergetool to handle paths with a leading space

From
RDRogan Dawes <rogan@dawes.za.net>
Date
Jan 6, 2008, 10:51 UTC
Message-ID
<4780B2BD.6020109@dawes.za.net>
In-Reply-To
<7vodbz5ka9.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 13 quoted lines
> Rogan Dawes <rogan@dawes.za.net> writes:
> 
>> Signed-off-by: Rogan Dawes <rogan@dawes.za.net>
>>
>> ---
>> I am working on a project which has the root directory constructed
>> with a leading space. i.e. ./ dir/. "read" skips the leading space
>> char, and ends up with an incorrect filename, which can then not be
>> found. Setting IFS=\n solves this problem.
> 
> Does the project have a file that has letter 'n' (en) in its name?
> Have you tested your patch while having a conflict in that file?
> 
Yes, it works correctly.

$ git mergetool merge tool candidates: kdiff3 tkdiff xxdiff meld gvimdiff vimdiff opendiff emerge vimdiff Merging the files: webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/BackDoors.java webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/BlindSqlInjection.java webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/Challenge2Screen.java

Normal merge conflict for ' 
webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/BackDoors.java':
   {local}: modified
   {remote}: modified
Hit return to start merge resolution tool (kdiff3):
merge of 
webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/BackDoors.java 
failed
$

My copy and paste does not show the spaces properly, since everything gets wrapped. but the "Normal merge conflict for ' webgoat/" line would have taken the ' to the next line if the space was not there. :-)

Note that the lines after "Merging the files" don't include the spaces, but that is just cosmetic, IMO.

Rogan
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “Allow git-mergetool to handle paths with a leading space”
  1. Allow git-mergetool to handle paths with a leading spaceRogan Dawes, Jan 6, 2008
  2. Junio C HamanoJan 6, 2008
  3. Rogan DawesJan 6, 2008
  4. Junio C HamanoJan 6, 2008
  5. Allow git-mergetool to handle paths with a leading spaceRogan Dawes, Jan 7, 2008
  6. Junio C HamanoJan 7, 2008
  7. Theodore TsoJan 8, 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.