git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alexander Gladysh" <agladysh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Shawn O. Pearce" <spearce-o8xcbExO1WpAfugRpC6u6w@public.gmane.org>
Cc: git-users-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	git-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Git Gui does not want to work on chunk level
Date: Thu, 4 Sep 2008 18:54:21 +0400	[thread overview]
Message-ID: <c6c947f60809040754g34e60633lcd5f872ac5e80158@mail.gmail.com> (raw)
In-Reply-To: <20080904143723.GB23708-o8xcbExO1WpAfugRpC6u6w@public.gmane.org>


(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.

  parent reply	other threads:[~2008-09-04 14:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c6c947f60808270216k2feb8f9ar765cdee1fc3910ee@mail.gmail.com>
     [not found] ` <c6c947f60808270216k2feb8f9ar765cdee1fc3910ee-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-03 19:23   ` Git Gui does not want to work on chunk level Alexander Gladysh
2008-09-03 23:08     ` Shawn O. Pearce
2008-09-04  9:20       ` Alexander Gladysh
2008-09-04 14:37         ` Shawn O. Pearce
     [not found]           ` <20080904143723.GB23708-o8xcbExO1WpAfugRpC6u6w@public.gmane.org>
2008-09-04 14:54             ` Alexander Gladysh [this message]
2008-09-05  4:53               ` Shawn O. Pearce
2008-09-05  5:18                 ` Junio C Hamano
2008-09-05  5:20                   ` Shawn O. Pearce
     [not found]                 ` <20080905045327.GA31166-o8xcbExO1WpAfugRpC6u6w@public.gmane.org>
2008-09-05 19:27                   ` Alexander Gladysh
2008-09-15  7:08                 ` Johannes Sixt
2010-11-30 21:19                   ` Bert Wesarg
2010-11-30 22:20                     ` Bert Wesarg
2010-12-06 21:30                       ` Bert Wesarg
2008-09-15 14:21                 ` Alexander Gladysh
     [not found]                   ` <c6c947f60809150721m1ec11f10xc68ce39559398659-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-15 14:24                     ` Shawn O. Pearce

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=c6c947f60809040754g34e60633lcd5f872ac5e80158@mail.gmail.com \
    --to=agladysh-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=git-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=git-users-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=spearce-o8xcbExO1WpAfugRpC6u6w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).