Re: Git Gui does not want to work on chunk level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Shawn, apologies for double-posting.)

> Actually the header you sent me privately wasn't well formed.
> It looked something like this:
>
>  diff --git a/path/file.ext b/path/file.ext
>  --- a/path/file.ext
>  +++ b/path/file.ext
>  --- assert(a != b)
>  --- assert(a != c)
>  @@ -10,1 +10,2 @@
>
> It looks to me like some part of the context became part of the
> diff header, with three "-" stuck in front of it.  Which git-apply
> then thinks is the pre-image path name.

Aha! Thank you! That "--" is a comment in Lua (that is commented line
that was removed in diff). First dash is from diff, next two came from
file itself.

Steps to reproduce the bug:

$ mkdir test
$ cd test
$ git init
Initialized empty Git repository in path/test/.git/
$ cat >file.ext
-- 1
-- 2
-- 3
-- 4
-- 5
^D
$ git add file.ext
$ git commit -m "one"
Created initial commit 9226cdf: one
 1 files changed, 5 insertions(+), 0 deletions(-)
 create mode 100644 file.ext
$ cat >file.ext
-- 1
-- 2
-- 33
-- 4
-- 5
$ git gui

And stage (sole) hunk. You see the error.

> Can you put in some more puts in that same section of the code
> so we can find out which of the puts has these extra asserts?
> Is it the first one for $current_diff_header or is it the second
> one that is supposed to be pulling in the patch hunk?  Do you see
> these extra asserts in the diff viewer like this before you try to
> apply the patch?

Hopefully the above steps would help to debug this bug directly. If
you still need any more info from me, please say, I'll be glad to
provide it.

Thank you again!
Alexander.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux