<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib, branch v2.3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-04-21T19:12:25Z</updated>
<entry>
<title>Merge branch 'jk/colors' into maint</title>
<updated>2015-04-21T19:12:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-21T19:12:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d544696afab635005503b18d71ca150b53d788a4'/>
<id>urn:sha1:d544696afab635005503b18d71ca150b53d788a4</id>
<content type='text'>
"diff-highlight" (in contrib/) used to show byte-by-byte
differences, which meant that multi-byte characters can be chopped
in the middle.  It learned to pay attention to character boundaries
(assuming the UTF-8 payload).

* jk/colors:
  diff-highlight: do not split multibyte characters
</content>
</entry>
<entry>
<title>diff-highlight: do not split multibyte characters</title>
<updated>2015-04-04T20:03:45Z</updated>
<author>
<name>Kyle J. McKay</name>
<email>mackyle@gmail.com</email>
</author>
<published>2015-04-03T22:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d00662d7d263448d90637ef6758fd2a0b526fec'/>
<id>urn:sha1:8d00662d7d263448d90637ef6758fd2a0b526fec</id>
<content type='text'>
When the input is UTF-8 and Perl is operating on bytes instead of
characters, a diff that changes one multibyte character to another
that shares an initial byte sequence will result in a broken diff
display as the common byte sequence prefix will be separated from
the rest of the bytes in the multibyte character.

For example, if a single line contains only the unicode character
U+C9C4 (encoded as UTF-8 0xEC, 0xA7, 0x84) and that line is then
changed to the unicode character U+C9C0 (encoded as UTF-8 0xEC,
0xA7, 0x80), when operating on bytes diff-highlight will show only
the single byte change from 0x84 to 0x80 thus creating invalid UTF-8
and a broken diff display.

Fix this by putting Perl into character mode when splitting the line
and then back into byte mode after the split is finished.

The utf8::xxx functions require Perl 5.8 so we require that as well.

Also, since we are mucking with code in the split_line function, we
change a '*' quantifier to a '+' quantifier when matching the $COLOR
expression which has the side effect of speeding everything up while
eliminating useless '' elements in the returned array.

Reported-by: Yi EungJun &lt;semtlenori@gmail.com&gt;
Signed-off-by: Kyle J. McKay &lt;mackyle@gmail.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sg/completion-gitcomp-nl-for-refs' into maint</title>
<updated>2015-03-28T16:33:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-28T16:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4eea8e3fa0c41137d7126a0ff262eb7a85991b90'/>
<id>urn:sha1:4eea8e3fa0c41137d7126a0ff262eb7a85991b90</id>
<content type='text'>
Code clean-up.

* sg/completion-gitcomp-nl-for-refs:
  completion: use __gitcomp_nl() for completing refs
</content>
</entry>
<entry>
<title>Merge branch 'ct/prompt-untracked-fix' into maint</title>
<updated>2015-03-28T16:33:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-28T16:33:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=245dd15aa9e086d82de7a9c947aa916e6d702f48'/>
<id>urn:sha1:245dd15aa9e086d82de7a9c947aa916e6d702f48</id>
<content type='text'>
The prompt script (in contrib/) did not show the untracked sign
when working in a subdirectory without any untracked files.

* ct/prompt-untracked-fix:
  git prompt: use toplevel to find untracked files
</content>
</entry>
<entry>
<title>Merge branch 'js/completion-ctags-pattern-substitution-fix' into maint</title>
<updated>2015-03-27T20:00:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-27T20:00:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=792c57273f5ccc318c93d32112548fbd033f5964'/>
<id>urn:sha1:792c57273f5ccc318c93d32112548fbd033f5964</id>
<content type='text'>
The code that reads from the ctags file in the completion script
(in contrib/) did not spell ${param/pattern/string} substitution
correctly, which happened to work with bash but not with zsh.

* js/completion-ctags-pattern-substitution-fix:
  contrib/completion: escape the forward slash in __git_match_ctag
</content>
</entry>
<entry>
<title>Merge branch 'sg/completion-remote' into maint</title>
<updated>2015-03-23T18:23:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-23T18:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d6f6e373007553d747b4f0f5083d66fdd0c17c5'/>
<id>urn:sha1:7d6f6e373007553d747b4f0f5083d66fdd0c17c5</id>
<content type='text'>
Code simplification.

* sg/completion-remote:
  completion: simplify __git_remotes()
  completion: add a test for __git_remotes() helper function
</content>
</entry>
<entry>
<title>Merge branch 'mg/doc-status-color-slot' into maint</title>
<updated>2015-03-23T18:23:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-23T18:23:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffac6258de4f72e06b6b2e412deffb00a1abb339'/>
<id>urn:sha1:ffac6258de4f72e06b6b2e412deffb00a1abb339</id>
<content type='text'>
Documentation fixes.

* mg/doc-status-color-slot:
  config,completion: add color.status.unmerged
</content>
</entry>
<entry>
<title>completion: use __gitcomp_nl() for completing refs</title>
<updated>2015-03-22T23:41:12Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder@ira.uka.de</email>
</author>
<published>2015-03-22T12:03:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=260d5850ad452adb7ac0ab70d0a5d0211bdd967f'/>
<id>urn:sha1:260d5850ad452adb7ac0ab70d0a5d0211bdd967f</id>
<content type='text'>
We do that almost everywhere, because it's faster for large number of
refs, see a31e62629 (completion: optimize refs completion, 2011-10-15).
These were the last two places where we still used __gitcomp() for
completing refs.

Signed-off-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git prompt: use toplevel to find untracked files</title>
<updated>2015-03-15T21:23:22Z</updated>
<author>
<name>Cody A Taylor</name>
<email>codemister99@yahoo.com</email>
</author>
<published>2015-03-13T02:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9bdc5173f0bc514d0b76165d45729622b2ad4d89'/>
<id>urn:sha1:9bdc5173f0bc514d0b76165d45729622b2ad4d89</id>
<content type='text'>
The __git_ps1() prompt function would not show an untracked state
when all the untracked files are outside the current working
directory.

Signed-off-by: Cody A Taylor &lt;codemister99@yahoo.com&gt;
Helped-by: SZEDER Gábor &lt;szeder@ira.uka.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>contrib/completion: escape the forward slash in __git_match_ctag</title>
<updated>2015-03-15T01:59:09Z</updated>
<author>
<name>John Szakmeister</name>
<email>john@szakmeister.net</email>
</author>
<published>2015-03-14T13:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db8d750876ce9c43b23ddfdbe618ec5dd12767ee'/>
<id>urn:sha1:db8d750876ce9c43b23ddfdbe618ec5dd12767ee</id>
<content type='text'>
The current definition results in an incorrect expansion of the term under zsh.
For instance "/^${1////\\/}/" under zsh with the argument "hi" results in:
    /^/\/h/\/i/

This results in an output similar to this when trying to complete `git grep
chartab` under zsh:

    :: git grep chartabawk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 }
    awk: cmd. line:1:    ^ backslash not last character on line
    awk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 }
    awk: cmd. line:1:    ^ syntax error

Leaving the prompt in a goofy state until the user hits a key.

Escaping the literal / in the parameter expansion (using "/^${1//\//\\/}/")
results in:
    /^chartab/

allowing the completion to work correctly.

This formulation also works under bash.

Signed-off-by: John Szakmeister &lt;john@szakmeister.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
