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

Re: git issue / [PATCH] MIPS: fix invalid symbolic link file

From
JHJunio C Hamano <gitster-e+axbwqsrlaavxtiumwx3w@public.gmane.org>
Date
Sep 19, 2013, 16:37 UTC
Message-ID
<xmqqsix0u5re.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20130919133920.GA22468-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org> writes:
Show 18 quoted lines
>> diff --git a/arch/mips/boot/dts/include/dt-bindings b/arch/mips/boot/dts/include/dt-bindings
>> index 68ae388..08c00e4 120000
>> --- a/arch/mips/boot/dts/include/dt-bindings
>> +++ b/arch/mips/boot/dts/include/dt-bindings
>> @@ -1 +1 @@
>> -../../../../../include/dt-bindings
>> +../../../../../include/dt-bindings
>> \ No newline at end of file
>> -- 
>> 1.7.10.4
>
> I applied your patch - but now git-show shows it as an empty commit and
>
>   ls -lb arch/mips/boot/dts/include/dt-bindings
>
> still shows the \n at the end of the link target.
> ...
> So, I wonder if this is a git bug.

Sounds as if "git am" is losing the important bit of information that new content ends with an incomplete line.

However, it does not reproduce for me.
    $ rm -fr /var/tmp/x && mkdir /var/tmp/x && cd /var/tmp/x
    $ git init
    $ ln -s 'a
    ' b
    $ git add b
    $ git commit -m initial
    $ ln -f -s a b
    $ git add b
    $ git commit -m fix
    $ git format-patch -1
    $ git checkout HEAD^
    $ git am 0001-*
    $ git diff HEAD^ HEAD
    diff --git a/b b/b
    index 7898192..2e65efe 120000
    --- a/b
    +++ b/b
    @@ -1 +1 @@
    -a
    +a
    \ No newline at end of file

I see the same with v1.7.10 (which may not match your version; v1.7.10.4 is what was used by the patch submitter to prepare the patch, and you did not say how you are applying the patches in your message) and with more recent Git. There is no such breakage.

I briefly suspected that you might be passing "--whitespace=fix" to "am" and that may be incorrectly "fixing" the incomplete line, but that is not the case. I get the same result if I add the option to "am" in the above transcript.

How are you applying the patch? What is your Git version? -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Previous: Stephen Warren
Message 4 of 4 in “Re: git issue / [PATCH] MIPS: fix invalid symbolic link file”
  1. Ralf BaechleSep 19, 2013
  2. Johannes SixtSep 19, 2013
  3. Stephen WarrenSep 19, 2013
  4. Junio C HamanoSep 19, 2013

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.