<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/lib/diff.tcl, branch gitgui-0.12.0</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=gitgui-0.12.0</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=gitgui-0.12.0'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2008-11-16T21:33:09Z</updated>
<entry>
<title>git-gui: Fix the after callback execution in rescan.</title>
<updated>2008-11-16T21:33:09Z</updated>
<author>
<name>Alexander Gavrilov</name>
<email>angavrilov@gmail.com</email>
</author>
<published>2008-11-16T18:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7cf4566f48b7f17c68ab215a9ca6ef7792d9d791'/>
<id>urn:sha1:7cf4566f48b7f17c68ab215a9ca6ef7792d9d791</id>
<content type='text'>
The rescan function receives a callback command
as its parameter, which is supposed to be executed
after the scan finishes. It is generally used to
update status. However, rescan may initiate a
loading of a diff, which always calls ui_ready after
completion. If the after handler is called before
that, ui_ready will override the new status.

This commit ensures that the after callback is
properly threaded through the diff machinery.

Since it uncovered the fact that force_first_diff
actually didn't work due to an undeclared global
variable, and the desired effects appeared only
because of the race condition between the diff
system and the rescan callback, I also reimplement
this function to make it behave as originally
intended.

Signed-off-by: Alexander Gavrilov &lt;angavrilov@gmail.com&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>git-gui: Do not munge conflict marker lines in a normal diff</title>
<updated>2008-11-01T23:12:29Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2008-10-14T11:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=63aa1d0cb78e8fcf36ea2b8b65750d9a45d59f63'/>
<id>urn:sha1:63aa1d0cb78e8fcf36ea2b8b65750d9a45d59f63</id>
<content type='text'>
Previously, conflict markers were highlighted in two ways: (1) They
received a distinguishing color; and (2) they had the '+' removed at the
beginning of the line. However, by doing (2), a hunk that contained
conflict markers could not be staged or unstaged because the resulting
patch was corrupted. With this change we no longer modify the diff text
of a 2-way diff, so that "Stage Hunk" and friends work.

Note that 3-way diff of a conflicted file is unaffected by this change,
and '++' before conflict markers is still removed. But this has no negative
impact because in this mode staging hunks or lines is disabled anyway.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>git-gui: Mark-up strings in show_{other,unmerged}_diff() for localization</title>
<updated>2008-10-10T16:33:21Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2008-10-03T11:13:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7f15b0027392155f5b3260bb584ba37126232bf1'/>
<id>urn:sha1:7f15b0027392155f5b3260bb584ba37126232bf1</id>
<content type='text'>
Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>git-gui: Show a round number of bytes of large untracked text files</title>
<updated>2008-10-10T16:33:21Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2008-10-03T08:28:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f2df8a5bfb6b766b0362a2cb545d5226a268bf37'/>
<id>urn:sha1:f2df8a5bfb6b766b0362a2cb545d5226a268bf37</id>
<content type='text'>
If an untracked text file is selected, then its contents are displayed
instead of a diff. If the file is large, then the following hint is
inserted at the top:

  * Untracked file is 14774881 bytes.
  * Showing only first 131072 bytes.

Why exactly 131072 bytes? With this patch it is 100000 bytes.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>git-gui: Reenable staging unmerged files by clicking the icon.</title>
<updated>2008-09-24T19:51:43Z</updated>
<author>
<name>Alexander Gavrilov</name>
<email>angavrilov@gmail.com</email>
</author>
<published>2008-09-20T08:19:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3e34838caf796e67c057a136d1fdfe1d4286a003'/>
<id>urn:sha1:3e34838caf796e67c057a136d1fdfe1d4286a003</id>
<content type='text'>
This restores functionality of the file icon for unmerged files.
Safety is enforced by loading the diff and checking for lines
that look like conflict markers. If such lines are found, or
the conflict involves deletion and/or symlinks, a confirmation
dialog is presented. Otherwise, the icon immediately stages the
working copy version of the file.

Includes a revert of 2fe5b2ee42897a3acc78e5ddaace3775eb2713ca
(Restore ability to Stage Working Copy for conflicts)

Signed-off-by: Alexander Gavrilov &lt;angavrilov@gmail.com&gt;
Tested-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>git-gui: Allow forcing display encoding for diffs using a submenu.</title>
<updated>2008-09-24T19:48:32Z</updated>
<author>
<name>Alexander Gavrilov</name>
<email>angavrilov@gmail.com</email>
</author>
<published>2008-09-17T21:07:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3fe0162362f80262ed1965f19c1f57f298931c94'/>
<id>urn:sha1:3fe0162362f80262ed1965f19c1f57f298931c94</id>
<content type='text'>
Add a submenu to allow dynamically changing the encoding to use
for diffs. Encoding settings are remembered while git-gui runs.
The rules are:

1) Encoding set for a specific file overrides gitattributes.
2) Last explicitly set value of the encoding overrides gui.encoding

Signed-off-by: Alexander Gavrilov &lt;angavrilov@gmail.com&gt;
Tested-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>git-gui: Cleanup handling of the default encoding.</title>
<updated>2008-09-24T19:48:32Z</updated>
<author>
<name>Alexander Gavrilov</name>
<email>angavrilov@gmail.com</email>
</author>
<published>2008-09-17T21:07:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=72e6b002021e45255f568fc0c885d82de75ae935'/>
<id>urn:sha1:72e6b002021e45255f568fc0c885d82de75ae935</id>
<content type='text'>
- Make diffs and blame default to the system (locale)
  encoding instead of hard-coding UTF-8.
- Add a gui.encoding option to allow overriding it.
- gitattributes still have the final word.

The rationale for this is Windows support:

1) Windows people are accustomed to using legacy encodings
   for text files. For many of them defaulting to utf-8
   will be counter-intuitive.
2) Windows doesn't support utf-8 locales, and switching
   the system encoding is a real pain. Thus the option.

This patch also adds proper encoding conversion to Apply Hunk/Line.

Signed-off-by: Alexander Gavrilov &lt;angavrilov@gmail.com&gt;
Tested-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>git-gui: Use gitattribute "encoding" for file content display</title>
<updated>2008-09-24T19:48:31Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2008-01-23T05:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1ffca60f0b0395e1e593e64d66e7ed3c47d8517e'/>
<id>urn:sha1:1ffca60f0b0395e1e593e64d66e7ed3c47d8517e</id>
<content type='text'>
Most folks using git-gui on internationalized files have complained
that it doesn't recognize UTF-8 correctly.  In the past we have just
ignored the problem and showed the file contents as binary/US-ASCII,
which is wrong no matter how you look at it.

This really should be a per-file attribute, managed by .gitattributes,
so we now pull the "encoding" attribute data for the given path from
the .gitattributes (if available) and use that, falling back to UTF-8
if the attributes are unavailable, git-check-attr is broken, or an
encoding for this path not specified.

We apply the encoding anytime we show file content, which currently
is limited to only the diff viewer and the blame viewer.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2008-09-05T04:53:06Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2008-09-05T04:53:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=95b6a2db25c6c3321be33ac17b6b2e54c407652d'/>
<id>urn:sha1:95b6a2db25c6c3321be33ac17b6b2e54c407652d</id>
<content type='text'>
* maint:
  git-gui: Fix diff parsing for lines starting with "--" or "++"
</content>
</entry>
<entry>
<title>git-gui: Fix diff parsing for lines starting with "--" or "++"</title>
<updated>2008-09-05T04:52:56Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2008-09-05T04:46:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ca53c3fdcf69f620331f3822cef36d95b5cf5640'/>
<id>urn:sha1:ca53c3fdcf69f620331f3822cef36d95b5cf5640</id>
<content type='text'>
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.

Reported-by: Alexander Gladysh &lt;agladysh@gmail.com&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
</feed>
