git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: git issue / [PATCH] MIPS: fix invalid symbolic link file
       [not found] <1379596148-32520-1-git-send-email-maddy@linux.vnet.ibm.com>
@ 2013-09-19 13:39 ` Ralf Baechle
       [not found]   ` <20130919133920.GA22468-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
  2013-09-19 19:49   ` Johannes Sixt
  0 siblings, 2 replies; 4+ messages in thread
From: Ralf Baechle @ 2013-09-19 13:39 UTC (permalink / raw)
  To: Madhavan Srinivasan, Grant Likely, Rob Herring, devicetree, git
  Cc: steven.hill, mmarek, swarren, linux-mips, linux-kbuild,
	james.hogan

On Thu, Sep 19, 2013 at 06:39:08PM +0530, Madhavan Srinivasan wrote:

(Git folks, please read on.)

>    Commit 3b29aa5ba204c created a symlink file in include/dt-bindings.
>    Even though commit diff is fine, symlink is invalid.
>    ls -lb shows a newline character at the end of the filename.
> 
> lrwxrwxrwx 1 maddy maddy 35 Sep 19 18:11 dt-bindings ->
> ../../../../../include/dt-bindings\n
> 
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
>  arch/mips/boot/dts/include/dt-bindings |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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.  Things are looking ok
now that I manually fixed the link and commited the result.  I hope
git-push and git-pull are going to handle this correct.

So, I wonder if this is a git bug.

The original patch that introduced the symlink with the \n is kernel
commit 3b29aa5ba204c62b3ec8f9f5b1ebd6e5d74f75d3 and is archived in
patchwork at http://patchwork.linux-mips.org/patch/5745/  The patch
file contains a \n at the end - but one would expect that from a
patch file that has been transfered via email, so I'm not sure how this
is supposed to work with emailed patches?!?

Anyway, I'm not too fond of sylinks in the tree or in patches and I'm
wondering if we could get rid of them for something more bullet proof.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git issue / [PATCH] MIPS: fix invalid symbolic link file
       [not found]   ` <20130919133920.GA22468-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
@ 2013-09-19 16:37     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2013-09-19 16:37 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Madhavan Srinivasan, Grant Likely, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA, git-u79uwXL29TY76Z2rM5mHXA,
	steven.hill-1AXoQHu6uovQT0dZR+AlfA, mmarek-AlSwsSmVLrQ,
	swarren-DDmLM1+adcrQT0dZR+AlfA, linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	linux-kbuild-u79uwXL29TY76Z2rM5mHXA,
	james.hogan-1AXoQHu6uovQT0dZR+AlfA

Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.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?
--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git issue / [PATCH] MIPS: fix invalid symbolic link file
  2013-09-19 13:39 ` git issue / [PATCH] MIPS: fix invalid symbolic link file Ralf Baechle
       [not found]   ` <20130919133920.GA22468-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
@ 2013-09-19 19:49   ` Johannes Sixt
  2013-09-19 20:36     ` Stephen Warren
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2013-09-19 19:49 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Madhavan Srinivasan, Grant Likely, Rob Herring, devicetree, git,
	steven.hill, mmarek, swarren, linux-mips, linux-kbuild,
	james.hogan

Am 19.09.2013 15:39, schrieb Ralf Baechle:
> The original patch that introduced the symlink with the \n is kernel
> commit 3b29aa5ba204c62b3ec8f9f5b1ebd6e5d74f75d3 and is archived in
> patchwork at http://patchwork.linux-mips.org/patch/5745/  The patch
> file contains a \n at the end - but one would expect that from a
> patch file that has been transfered via email, so I'm not sure how this
> is supposed to work with emailed patches?!?

The mbox file I downloaded from this link looks like this:


arch/mips/boot/dts/include/dt-bindings | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 arch/mips/boot/dts/include/dt-bindings

\ No newline at end of file

diff --git a/.../include/dt-bindings b/.../include/dt-bindings
new file mode 120000
index 0000000..08c00e4
--- /dev/null
+++ b/arch/mips/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings


but it should look like this:


arch/mips/boot/dts/include/dt-bindings | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 arch/mips/boot/dts/include/dt-bindings

diff --git a/.../include/dt-bindings b/.../include/dt-bindings
new file mode 120000
index 0000000..08c00e4
--- /dev/null
+++ b/arch/mips/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings
\ No newline at end of file


Whoever or whatever moved the '\ No newline at end of file' line above
the patch text is to blame.

-- Hannes

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: git issue / [PATCH] MIPS: fix invalid symbolic link file
  2013-09-19 19:49   ` Johannes Sixt
@ 2013-09-19 20:36     ` Stephen Warren
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2013-09-19 20:36 UTC (permalink / raw)
  To: Johannes Sixt
  Cc: Ralf Baechle, Madhavan Srinivasan, Grant Likely, Rob Herring,
	devicetree, git, steven.hill, mmarek, swarren, linux-mips,
	linux-kbuild, james.hogan

On 09/19/2013 01:49 PM, Johannes Sixt wrote:
> Am 19.09.2013 15:39, schrieb Ralf Baechle:
>> The original patch that introduced the symlink with the \n is kernel
>> commit 3b29aa5ba204c62b3ec8f9f5b1ebd6e5d74f75d3 and is archived in
>> patchwork at http://patchwork.linux-mips.org/patch/5745/  The patch
>> file contains a \n at the end - but one would expect that from a
>> patch file that has been transfered via email, so I'm not sure how this
>> is supposed to work with emailed patches?!?
> 
> The mbox file I downloaded from this link looks like this:
...
> but it should look like this:
...
> Whoever or whatever moved the '\ No newline at end of file' line above
> the patch text is to blame.

That sounds like a patchwork problem; the original copy of the message I
received looks correct.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-19 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1379596148-32520-1-git-send-email-maddy@linux.vnet.ibm.com>
2013-09-19 13:39 ` git issue / [PATCH] MIPS: fix invalid symbolic link file Ralf Baechle
     [not found]   ` <20130919133920.GA22468-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
2013-09-19 16:37     ` Junio C Hamano
2013-09-19 19:49   ` Johannes Sixt
2013-09-19 20:36     ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).