<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/git.git, branch as/log-output-encoding-in-user-format</title>
<subtitle>github.com: git/git.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/'/>
<entry>
<title>t4205 (log-pretty-formats): avoid using `sed`</title>
<updated>2013-07-05T18:54:53+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>alex.crezoff@gmail.com</email>
</author>
<published>2013-07-05T12:01:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=37eb772ef3a5da0b28d3759373d714b349306ea4'/>
<id>37eb772ef3a5da0b28d3759373d714b349306ea4</id>
<content type='text'>
For testing truncated log messages 'commit_msg' function uses `sed` to
cut a message. On various platforms `sed` behaves differently and
results of its work depend on locales installed. So, avoid using `sed`.
Use predefined expected outputs instead of calculated ones.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For testing truncated log messages 'commit_msg' function uses `sed` to
cut a message. On various platforms `sed` behaves differently and
results of its work depend on locales installed. So, avoid using `sed`.
Use predefined expected outputs instead of calculated ones.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t6006 (rev-list-format): add tests for "%b" and "%s" for the case i18n.commitEncoding is not set</title>
<updated>2013-07-05T18:43:28+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>alex.crezoff@gmail.com</email>
</author>
<published>2013-07-05T12:01:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=0fe6df3ce8e6373536d1a9016cac9126a1aed0da'/>
<id>0fe6df3ce8e6373536d1a9016cac9126a1aed0da</id>
<content type='text'>
In de6029a (pretty: Add failing tests: --format output should honor
logOutputEncoding, 2013-06-26) 'complex-subject' test was changed.
Revert it back, because that change actually removed tests for "%b"
and "%s" with i18n.commitEncoding set.  Also, add two more tests for
mentioned above "%b" and "%s" to test encoding conversions with no
i18n.commitEncoding set.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Suggested-by: Johannes Sixt &lt;j.sixt@viscovery.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In de6029a (pretty: Add failing tests: --format output should honor
logOutputEncoding, 2013-06-26) 'complex-subject' test was changed.
Revert it back, because that change actually removed tests for "%b"
and "%s" with i18n.commitEncoding set.  Also, add two more tests for
mentioned above "%b" and "%s" to test encoding conversions with no
i18n.commitEncoding set.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Suggested-by: Johannes Sixt &lt;j.sixt@viscovery.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t4205, t6006, t7102: make functions better readable</title>
<updated>2013-07-05T18:40:18+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>alex.crezoff@gmail.com</email>
</author>
<published>2013-07-05T12:01:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=17cc2ef1c5f160056f5ca8cf4bd795ddd9b76bd3'/>
<id>17cc2ef1c5f160056f5ca8cf4bd795ddd9b76bd3</id>
<content type='text'>
Function 'test_format' has become harder to read after its change in
de6029a2 (pretty: Add failing tests: --format output should honor
logOutputEncoding, 2013-06-26). Simplify it by moving its "should we
expect it to fail?" parameter to the end.

Note, current code does not use this last parameter as far as there
are no tests expected to fail. We can keep that for future use.

Also, reformat comments.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Improved-by: Johannes Sixt &lt;j.sixt@viscovery.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Function 'test_format' has become harder to read after its change in
de6029a2 (pretty: Add failing tests: --format output should honor
logOutputEncoding, 2013-06-26). Simplify it by moving its "should we
expect it to fail?" parameter to the end.

Note, current code does not use this last parameter as far as there
are no tests expected to fail. We can keep that for future use.

Also, reformat comments.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Improved-by: Johannes Sixt &lt;j.sixt@viscovery.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t4205 (log-pretty-formats): revert back single quotes</title>
<updated>2013-07-05T18:35:39+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>alex.crezoff@gmail.com</email>
</author>
<published>2013-07-05T12:01:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=f3445f781f95ca4a7d59028aa7b7457fa925f577'/>
<id>f3445f781f95ca4a7d59028aa7b7457fa925f577</id>
<content type='text'>
In previuos commit de6029a (pretty: Add failing tests: --format output
should honor logOutputEncoding, 2013-06-26) single quotes were replaced
with double quotes to make "$(commit_msg)" expression in heredoc to
work. The same effect can be achieved by using "EOF" as a heredoc
delimiter instead of "\EOF".

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Suggested-by: Johannes Sixt &lt;j.sixt@viscovery.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In previuos commit de6029a (pretty: Add failing tests: --format output
should honor logOutputEncoding, 2013-06-26) single quotes were replaced
with double quotes to make "$(commit_msg)" expression in heredoc to
work. The same effect can be achieved by using "EOF" as a heredoc
delimiter instead of "\EOF".

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Suggested-by: Johannes Sixt &lt;j.sixt@viscovery.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t4041, t4205, t6006, t7102: use iso8859-1 rather than iso-8859-1</title>
<updated>2013-07-05T07:05:00+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>alex.crezoff@gmail.com</email>
</author>
<published>2013-07-04T12:45:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=14332bccc1d88e89fa8950b92c034432e1585bd4'/>
<id>14332bccc1d88e89fa8950b92c034432e1585bd4</id>
<content type='text'>
Both "iso8859-1" and "iso-8859-1" are understood as latin-1 by
modern platforms, but the latter is not understood by older
platforms;update tests to use the former.

This is in line with 3994e8a9 (t4201: use ISO8859-1 rather than
ISO-8859-1, 2009-12-03), which did the same.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Reviewed-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both "iso8859-1" and "iso-8859-1" are understood as latin-1 by
modern platforms, but the latter is not understood by older
platforms;update tests to use the former.

This is in line with 3994e8a9 (t4201: use ISO8859-1 rather than
ISO-8859-1, 2009-12-03), which did the same.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Reviewed-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t4205: replace .\+ with ..* in sed commands</title>
<updated>2013-07-01T19:28:06+00:00</updated>
<author>
<name>Brian Gernhardt</name>
<email>brian@gernhardtsoftware.com</email>
</author>
<published>2013-07-01T18:59:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=7c37521487332fd700e2fa58bd2547d275e4f4d2'/>
<id>7c37521487332fd700e2fa58bd2547d275e4f4d2</id>
<content type='text'>
OS X's sed only accepts basic regular expressions, which does not
allow the + quantifier.  However '..*' (anything, followed by zero or
more anything) is the same as '.\+' (one or more anything) and valid
in any regular expression language.

Signed-off-by: Brian Gernhardt &lt;brian@gernhardtsoftware.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OS X's sed only accepts basic regular expressions, which does not
allow the + quantifier.  However '..*' (anything, followed by zero or
more anything) is the same as '.\+' (one or more anything) and valid
in any regular expression language.

Signed-off-by: Brian Gernhardt &lt;brian@gernhardtsoftware.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pretty: --format output should honor logOutputEncoding</title>
<updated>2013-06-26T18:40:31+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>Alex.Crezoff@gmail.com</email>
</author>
<published>2013-06-26T10:19:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=ecaee8050cec23eb4cf082512e907e3e52c20b57'/>
<id>ecaee8050cec23eb4cf082512e907e3e52c20b57</id>
<content type='text'>
One can set an alias
	$ git config [--global] alias.lg "log --graph --pretty=format:'%Cred%h%Creset
	-%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)&lt;%an&gt;%Creset'
	--abbrev-commit --date=local"

to see the log as a pretty tree (like *gitk* but in a terminal).

However, log messages written in an encoding i18n.commitEncoding which differs
from terminal encoding are shown corrupted even when i18n.logOutputEncoding
and terminal encoding are the same (e.g. log messages committed on a Cygwin box
with Windows-1251 encoding seen on a Linux box with a UTF-8 encoding and vice versa).

To simplify an example we can say the following two commands are expected
to give the same output to a terminal:

	$ git log --oneline --no-color
	$ git log --pretty=format:'%h %s'

However, the former pays attention to i18n.logOutputEncoding
configuration, while the latter does not when it formats "%s".

The same corruption is true for
	$ git diff --submodule=log
and
	$ git rev-list --pretty=format:%s HEAD
and
	$ git reset --hard

This patch makes pretty --format honor logOutputEncoding when it formats
log message.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One can set an alias
	$ git config [--global] alias.lg "log --graph --pretty=format:'%Cred%h%Creset
	-%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)&lt;%an&gt;%Creset'
	--abbrev-commit --date=local"

to see the log as a pretty tree (like *gitk* but in a terminal).

However, log messages written in an encoding i18n.commitEncoding which differs
from terminal encoding are shown corrupted even when i18n.logOutputEncoding
and terminal encoding are the same (e.g. log messages committed on a Cygwin box
with Windows-1251 encoding seen on a Linux box with a UTF-8 encoding and vice versa).

To simplify an example we can say the following two commands are expected
to give the same output to a terminal:

	$ git log --oneline --no-color
	$ git log --pretty=format:'%h %s'

However, the former pays attention to i18n.logOutputEncoding
configuration, while the latter does not when it formats "%s".

The same corruption is true for
	$ git diff --submodule=log
and
	$ git rev-list --pretty=format:%s HEAD
and
	$ git reset --hard

This patch makes pretty --format honor logOutputEncoding when it formats
log message.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pretty: Add failing tests: --format output should honor logOutputEncoding</title>
<updated>2013-06-26T18:40:27+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>Alex.Crezoff@gmail.com</email>
</author>
<published>2013-06-26T10:19:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=de6029a2d7734a93a9e27b9c4471862a47dd8123'/>
<id>de6029a2d7734a93a9e27b9c4471862a47dd8123</id>
<content type='text'>
One can set an alias
	$ git config alias.lg "log --graph --pretty=format:'%Cred%h%Creset
	-%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)&lt;%an&gt;%Creset'
	--abbrev-commit --date=local"

to see the log as a pretty tree (like *gitk* but in a terminal).

However, log messages written in an encoding i18n.commitEncoding which differs
from terminal encoding are shown corrupted even when i18n.logOutputEncoding
and terminal encoding are the same (e.g. log messages committed on a Cygwin box
with Windows-1251 encoding seen on a Linux box with a UTF-8 encoding and vice versa).

To simplify an example we can say the following two commands are expected
to give the same output to a terminal:

	$ git log --oneline --no-color
	$ git log --pretty=format:'%h %s'

However, the former pays attention to i18n.logOutputEncoding
configuration, while the latter does not when it formats "%s".

The same corruption is true for
	$ git diff --submodule=log
and
	$ git rev-list --pretty=format:%s HEAD
and
	$ git reset --hard

This patch adds failing tests for the next patch that fixes them.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One can set an alias
	$ git config alias.lg "log --graph --pretty=format:'%Cred%h%Creset
	-%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)&lt;%an&gt;%Creset'
	--abbrev-commit --date=local"

to see the log as a pretty tree (like *gitk* but in a terminal).

However, log messages written in an encoding i18n.commitEncoding which differs
from terminal encoding are shown corrupted even when i18n.logOutputEncoding
and terminal encoding are the same (e.g. log messages committed on a Cygwin box
with Windows-1251 encoding seen on a Linux box with a UTF-8 encoding and vice versa).

To simplify an example we can say the following two commands are expected
to give the same output to a terminal:

	$ git log --oneline --no-color
	$ git log --pretty=format:'%h %s'

However, the former pays attention to i18n.logOutputEncoding
configuration, while the latter does not when it formats "%s".

The same corruption is true for
	$ git diff --submodule=log
and
	$ git rev-list --pretty=format:%s HEAD
and
	$ git reset --hard

This patch adds failing tests for the next patch that fixes them.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs</title>
<updated>2013-06-26T18:33:00+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>Alex.Crezoff@gmail.com</email>
</author>
<published>2013-06-26T10:19:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=a742f2a0a7e57bb7d3f55cb8312c3f4cc4dc68fb'/>
<id>a742f2a0a7e57bb7d3f55cb8312c3f4cc4dc68fb</id>
<content type='text'>
The expected SHA-1 digests are always available in variables. Use
them instead of hardcoding.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The expected SHA-1 digests are always available in variables. Use
them instead of hardcoding.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>t7102 (reset): don't hardcode SHA-1 in expected outputs</title>
<updated>2013-06-26T18:33:00+00:00</updated>
<author>
<name>Alexey Shumkin</name>
<email>Alex.Crezoff@gmail.com</email>
</author>
<published>2013-06-26T10:19:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/git.git/commit/?id=375775bb1289a0b78f26b8ec08627fd133920ab9'/>
<id>375775bb1289a0b78f26b8ec08627fd133920ab9</id>
<content type='text'>
The expected SHA-1 digests are always available in variables. Use
them instead of hardcoding.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The expected SHA-1 digests are always available in variables. Use
them instead of hardcoding.

Signed-off-by: Alexey Shumkin &lt;Alex.Crezoff@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
