<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin, branch v2.3.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-02-25T06:10:41Z</updated>
<entry>
<title>Merge branch 'jc/apply-ws-fix-expands' into maint</title>
<updated>2015-02-25T06:10:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-25T06:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2764442ac9a66532789526a6e6aaf0f1254a3548'/>
<id>urn:sha1:2764442ac9a66532789526a6e6aaf0f1254a3548</id>
<content type='text'>
"git apply --whitespace=fix" used to under-allocate the memory
when the fix resulted in a longer text than the original patch.

* jc/apply-ws-fix-expands:
  apply: count the size of postimage correctly
  apply: make update_pre_post_images() sanity check the given postlen
  apply.c: typofix
</content>
</entry>
<entry>
<title>Merge branch 'mg/commit-author-no-match-malformed-message' into maint</title>
<updated>2015-02-25T06:10:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-25T06:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7070c03d514a5519a3a4c9dbb47932d522dcb4bd'/>
<id>urn:sha1:7070c03d514a5519a3a4c9dbb47932d522dcb4bd</id>
<content type='text'>
The error message from "git commit", when a non-existing author
name was given as value to the "--author=" parameter, has been
reworded to avoid misunderstanding.

* mg/commit-author-no-match-malformed-message:
  commit: reword --author error message
</content>
</entry>
<entry>
<title>Merge branch 'dk/format-patch-ignore-diff-submodule' into maint</title>
<updated>2015-02-25T06:10:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-25T06:10:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=66061294915065375c7eaa4e3a72e4834590f32b'/>
<id>urn:sha1:66061294915065375c7eaa4e3a72e4834590f32b</id>
<content type='text'>
Setting diff.submodule to 'log' made "git format-patch" produce
broken patches.

* dk/format-patch-ignore-diff-submodule:
  format-patch: ignore diff.submodule setting
  t4255: test am submodule with diff.submodule
</content>
</entry>
<entry>
<title>Merge branch 'jk/blame-commit-label' into maint</title>
<updated>2015-02-25T06:09:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-25T06:09:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=faf723a631aff822b4808c496c0970edb0ca2a99'/>
<id>urn:sha1:faf723a631aff822b4808c496c0970edb0ca2a99</id>
<content type='text'>
"git blame HEAD -- missing" failed to correctly say "HEAD" when it
tried to say "No such path 'missing' in HEAD".

* jk/blame-commit-label:
  blame.c: fix garbled error message
  use xstrdup_or_null to replace ternary conditionals
  builtin/commit.c: use xstrdup_or_null instead of envdup
  builtin/apply.c: use xstrdup_or_null instead of null_strdup
  git-compat-util: add xstrdup_or_null helper
</content>
</entry>
<entry>
<title>commit: reword --author error message</title>
<updated>2015-01-27T03:57:12Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2015-01-26T15:48:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1044b1f6a1a56ae723fd19cddd769380dc775f48'/>
<id>urn:sha1:1044b1f6a1a56ae723fd19cddd769380dc775f48</id>
<content type='text'>
If an --author argument is specified but does not contain a '&gt;' then git tries
to find the argument within the existing authors; and gives the error
message "No existing author found with '%s'" if there is no match.

This is confusing for users who try to specify a valid complete author
name.

Rename the error message to make it clearer that the failure has two
reasons in this case.

(This codepath is touched only when we know already that the argument
cannot be a completely wellformed author ident.)

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Helped-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 'ak/cat-file-clean-up'</title>
<updated>2015-01-22T21:46:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-22T21:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=67b5440d0dac6ee41fdd3d4c4780be48b230763e'/>
<id>urn:sha1:67b5440d0dac6ee41fdd3d4c4780be48b230763e</id>
<content type='text'>
* ak/cat-file-clean-up:
  cat-file: use "type" and "size" from outer scope
</content>
</entry>
<entry>
<title>apply: count the size of postimage correctly</title>
<updated>2015-01-22T20:57:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-16T23:32:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=407a792ef7e3c142a47c6b09a80f9ede4e14f444'/>
<id>urn:sha1:407a792ef7e3c142a47c6b09a80f9ede4e14f444</id>
<content type='text'>
Under --whitespace=fix option, match_fragment() function examines
the preimage (the common context and the removed lines in the patch)
and the file being patched and checks if they match after correcting
all whitespace errors.  When they are found to match, the common
context lines in the preimage is replaced with the fixed copy,
because these lines will then be copied to the corresponding place
in the postimage by a later call to update_pre_post_images().  Lines
that are added in the postimage, under --whitespace=fix, have their
whitespace errors already fixed when apply_one_fragment() prepares
the preimage and the postimage, so in the end, application of the
patch can be done by replacing the block of text in the file being
patched that matched the preimage with what is in the postimage that
was updated by update_pre_post_images().

In the earlier days, fixing whitespace errors always resulted in
reduction of size, either collapsing runs of spaces in the indent to
a tab or removing the trailing whitespaces.  These days, however,
some whitespace error fix results in extending the size.

250b3c6c (apply --whitespace=fix: avoid running over the postimage
buffer, 2013-03-22) tried to compute the final postimage size but
its math was flawed.  It counted the size of the block of text in
the original being patched after fixing the whitespace errors on its
lines that correspond to the preimage.  That number does not have
much to do with how big the final postimage would be.

Instead count (1) the added lines in the postimage, whose size is
the same as in the final patch result because their whitespace
errors have already been corrected, and (2) the fixed size of the
lines that are common.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply: make update_pre_post_images() sanity check the given postlen</title>
<updated>2015-01-22T20:57:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-16T19:54:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2988289f2c5764605105037bfcb12f85b9971cf9'/>
<id>urn:sha1:2988289f2c5764605105037bfcb12f85b9971cf9</id>
<content type='text'>
"git apply --whitespace=fix" used to be able to assume that fixing
errors will always reduce the size by e.g. stripping whitespaces at
the end of lines or collapsing runs of spaces into tabs at the
beginning of lines.  An update to accomodate fixes that lengthens
the result by e.g. expanding leading tabs into spaces were made long
time ago but the logic miscounted the necessary space after such
whitespace fixes, leading to either under-allocation or over-usage
of already allocated space.

Illustrate this with a runtime sanity-check to protect us from
future breakage.  The test was stolen from Kyle McKay who helped
to identify the problem.

Helped-by: "Kyle J. McKay" &lt;mackyle@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply.c: typofix</title>
<updated>2015-01-22T20:57:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-16T21:54:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=923fc5ab4017801078a54310f94fd95c28b91ce0'/>
<id>urn:sha1:923fc5ab4017801078a54310f94fd95c28b91ce0</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ak/show-branch-usage-string'</title>
<updated>2015-01-21T00:16:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-21T00:16:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=17ad37112de878e7f946d202f830c95907d40f70'/>
<id>urn:sha1:17ad37112de878e7f946d202f830c95907d40f70</id>
<content type='text'>
* ak/show-branch-usage-string:
  show-branch: fix indentation of usage string
</content>
</entry>
</feed>
