From: Junio C Hamano <gitster@pobox.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
devicetree@vger.kernel.org, git@vger.kernel.org,
steven.hill@imgtec.com, mmarek@suse.cz, swarren@nvidia.com,
linux-mips@linux-mips.org, linux-kbuild@vger.kernel.org,
james.hogan@imgtec.com
Subject: Re: git issue / [PATCH] MIPS: fix invalid symbolic link file
Date: Thu, 19 Sep 2013 09:37:41 -0700 [thread overview]
Message-ID: <xmqqsix0u5re.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20130919133920.GA22468@linux-mips.org> (Ralf Baechle's message of "Thu, 19 Sep 2013 15:39:20 +0200")
Ralf Baechle <ralf@linux-mips.org> writes:
>> 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?
next prev parent reply other threads:[~2013-09-19 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 13:09 [PATCH] MIPS: fix invalid symbolic link file Madhavan Srinivasan
2013-09-19 13:39 ` git issue / " Ralf Baechle
2013-09-19 16:37 ` Junio C Hamano [this message]
2013-09-19 19:49 ` Johannes Sixt
2013-09-19 20:36 ` Stephen Warren
2013-09-19 14:21 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsix0u5re.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=devicetree@vger.kernel.org \
--cc=git@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=james.hogan@imgtec.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mmarek@suse.cz \
--cc=ralf@linux-mips.org \
--cc=rob.herring@calxeda.com \
--cc=steven.hill@imgtec.com \
--cc=swarren@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox