<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin, branch v2.3.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-01-22T21:46:38Z</updated>
<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>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>
<entry>
<title>show-branch: fix indentation of usage string</title>
<updated>2015-01-21T00:12:54Z</updated>
<author>
<name>Ralf Thielow</name>
<email>ralf.thielow@gmail.com</email>
</author>
<published>2015-01-20T19:30:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d6589d1ba42dd87c282c72045537f5eea8aaefcf'/>
<id>urn:sha1:d6589d1ba42dd87c282c72045537f5eea8aaefcf</id>
<content type='text'>
Noticed-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rc/for-each-ref-tracking'</title>
<updated>2015-01-14T20:39:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T20:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=401a317aae36fd979da9eafbdd9415fa5ac6e119'/>
<id>urn:sha1:401a317aae36fd979da9eafbdd9415fa5ac6e119</id>
<content type='text'>
* rc/for-each-ref-tracking:
  for-each-ref: always check stat_tracking_info()'s return value
</content>
</entry>
<entry>
<title>Merge branch 'ak/fewer-includes'</title>
<updated>2015-01-14T20:37:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T20:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=09deda3746a0c726a79a6e2db4fd8d864aa08e51'/>
<id>urn:sha1:09deda3746a0c726a79a6e2db4fd8d864aa08e51</id>
<content type='text'>
* ak/fewer-includes:
  cat-file: remove unused includes
  git.c: remove unnecessary #includes
</content>
</entry>
<entry>
<title>Merge branch 'ak/show-branch-usage-string'</title>
<updated>2015-01-14T20:37:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T20:37:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d62078e9107f01c902c260e34b509a6c7467ac70'/>
<id>urn:sha1:d62078e9107f01c902c260e34b509a6c7467ac70</id>
<content type='text'>
* ak/show-branch-usage-string:
  show-branch: line-wrap show-branch usage
</content>
</entry>
<entry>
<title>Merge branch 'km/log-usage-string-i18n'</title>
<updated>2015-01-14T20:32:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T20:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e9f91191cc62a013a11fd6ff1a1cdaf48c5fb385'/>
<id>urn:sha1:e9f91191cc62a013a11fd6ff1a1cdaf48c5fb385</id>
<content type='text'>
* km/log-usage-string-i18n:
  log.c: fix translation markings
</content>
</entry>
<entry>
<title>Merge branch 'js/remote-add-with-insteadof'</title>
<updated>2015-01-14T20:29:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T20:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7fd92d9ed0255faf64ed78f02eadc902c7824008'/>
<id>urn:sha1:7fd92d9ed0255faf64ed78f02eadc902c7824008</id>
<content type='text'>
"git remote add $name $URL" is now allowed when "url.$URL.insteadOf"
is already defined.

* js/remote-add-with-insteadof:
  Add a regression test for 'git remote add &lt;existing&gt; &lt;same-url&gt;'
  git remote: allow adding remotes agreeing with url.&lt;...&gt;.insteadOf
</content>
</entry>
<entry>
<title>cat-file: use "type" and "size" from outer scope</title>
<updated>2015-01-13T20:36:04Z</updated>
<author>
<name>Alexander Kuleshov</name>
<email>kuleshovmail@gmail.com</email>
</author>
<published>2015-01-10T18:13:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=331004836b3b374ce379775782367e4adf6f204a'/>
<id>urn:sha1:331004836b3b374ce379775782367e4adf6f204a</id>
<content type='text'>
In cat_one_file(), "type" and "size" variables are defined in the
function scope, and then two variables of the same name are defined
in a block in one of the if/else statement, hiding the definitions
in the outer scope.

Because the values of the outer variables before the control enters
this scope, however, do not have to be preserved, we can remove
useless definitions of variables from the inner scope safely without
breaking anything.

Signed-off-by: Alexander Kuleshov &lt;kuleshovmail@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>for-each-ref: always check stat_tracking_info()'s return value</title>
<updated>2015-01-12T23:10:46Z</updated>
<author>
<name>Raphael Kubo da Costa</name>
<email>raphael.kubo.da.costa@intel.com</email>
</author>
<published>2015-01-05T09:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6160d950c9ef168d0f7d7c9b2812f280e5b88fb'/>
<id>urn:sha1:b6160d950c9ef168d0f7d7c9b2812f280e5b88fb</id>
<content type='text'>
The code handling %(upstream:track) and %(upstream:trackshort)
assumed that it always had a valid branch that had been sanitized
earlier in populate_value(), and thus did not check the return value
of the call to stat_tracking_info().

While there is indeed some sanitization code that basically
corresponds to stat_tracking_info() returning 0 (no base branch
set), the function can also return -1 when the base branch did exist
but has since then been deleted.

In this case, num_ours and num_theirs had undefined values and a
call to `git for-each-ref --format="%(upstream:track)"` could print
spurious values such as

  [behind -111794512]
  [ahead 38881640, behind 5103867]

even for repositories with one single commit.

Verify stat_tracking_info()'s return value and do not print anything
if it returns -1. This behavior also matches the documentation ("has
no effect if the ref does not have tracking information associated
with it").

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Raphael Kubo da Costa &lt;raphael.kubo.da.costa@intel.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
