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

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

 



On Mon, Sep 15, 2008 at 09:08, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
> Shawn O. Pearce schrieb:
>> git-gui: Fix diff parsing for lines starting with "--" or "++"
>>
>> Languages like Lua and SQL use "--" to mark a line as commented out.
>> If this appears at column 0 and is part of the pre-image we may see
>> "--- foo" in the diff, indicating that the line whose content is
>> Â"-- foo" has been removed from the new version.
>>
>> git-gui was incorrectly parsing "--- foo" as the old file name
>> in the file header, causing it to generate a bad patch file when
>> the user tried to stage or unstage a hunk or the selected line.
>> We need to keep track of where we are in the parsing so that we do
>> not misread a deletion or addition record as part of the header.
>
> This (slightly) breaks parsing of new files and removed files that are
> staged by showing the file names in the diff header:
>
> Ânew file mode 100644
> Â--- /dev/null
> Â+++ b/foo
> Â@@ -0,0 +1 @@
> Â+foo

I just noticed the same, and ask me why this report wasn't honored.

Also git may spill out 2 diffs for type changes (file to symlink, for
example). In this case the we should probably disable any hunk- or
line-level (un)staging.

Bert

>
> -- Hannes
--
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]