<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.c, branch v2.3.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-02-25T06:09:54Z</updated>
<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>use xstrdup_or_null to replace ternary conditionals</title>
<updated>2015-01-13T18:05:48Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-01-13T01:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c53f0719b04e0b6328c2e175e3c5d2dc8a0c282'/>
<id>urn:sha1:8c53f0719b04e0b6328c2e175e3c5d2dc8a0c282</id>
<content type='text'>
This replaces "x ? xstrdup(x) : NULL" with xstrdup_or_null(x).
The change is fairly mechanical, with the exception of
resolve_refdup, which can eliminate a temporary variable.

There are still a few hits grepping for "?.*xstrdup", but
these are of slightly different forms and cannot be
converted (e.g., "x ? xstrdup(x-&gt;foo) : NULL").

Signed-off-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 'jc/checkout-local-track-report'</title>
<updated>2015-01-07T20:41:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-07T20:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da178ac793047c41e4806a3c32fb421992642683'/>
<id>urn:sha1:da178ac793047c41e4806a3c32fb421992642683</id>
<content type='text'>
The report from "git checkout" on a branch that builds on another
local branch by setting its branch.*.merge to branch name (not a
full refname) incorrectly said that the upstream is gone.

* jc/checkout-local-track-report:
  checkout: report upstream correctly even with loosely defined branch.*.merge
</content>
</entry>
<entry>
<title>sort_string_list(): rename to string_list_sort()</title>
<updated>2014-11-25T18:11:34Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-11-25T08:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3383e199847485fedf83d0fa38bbd5363074093a'/>
<id>urn:sha1:3383e199847485fedf83d0fa38bbd5363074093a</id>
<content type='text'>
The new name is more consistent with the names of other
string_list-related functions.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs.c: change resolve_ref_unsafe reading argument to be a flags field</title>
<updated>2014-10-15T17:47:24Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-07-15T19:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7695d118e5a3c9c6fcb4cb15eb766a1c57422aed'/>
<id>urn:sha1:7695d118e5a3c9c6fcb4cb15eb766a1c57422aed</id>
<content type='text'>
resolve_ref_unsafe takes a boolean argument for reading (a nonexistent ref
resolves successfully for writing but not for reading).  Change this to be
a flags field instead, and pass the new constant RESOLVE_REF_READING when
we want this behaviour.

While at it, swap two of the arguments in the function to put output
arguments at the end.  As a nice side effect, this ensures that we can
catch callers that were unaware of the new API so they can be audited.

Give the wrapper functions resolve_refdup and read_ref_full the same
treatment for consistency.

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>checkout: report upstream correctly even with loosely defined branch.*.merge</title>
<updated>2014-10-14T22:12:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-14T21:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=05e73682cd28eeaf6d949badefd85b94244fca3f'/>
<id>urn:sha1:05e73682cd28eeaf6d949badefd85b94244fca3f</id>
<content type='text'>
When checking out a branch that is set to build on top of another
branch (often, a remote-tracking branch), "git checkout" reports how
your work relates to the other branch, e.g.

    Your branch is behind 'origin/master', and can be fast-forwarded.

Back when this feature was introduced, this was only done for
branches that build on remote-tracking branches, but 5e6e2b48 (Make
local branches behave like remote branches when --tracked,
2009-04-01) added support to give the same report for branches that
build on other local branches (i.e. branches whose branch.*.remote
variables are set to '.').  Unlike the support for the branches
building on remote-tracking branches, however, this did not take
into account the fact that branch.*.merge configuration is allowed
to record a shortened branch name.

When branch.*.merge is set to 'master' (not 'refs/heads/master'),
i.e. "my branch builds on the local 'master' branch", this caused
"git checkout" to report:

    Your branch is based on 'master', but the upstream is gone.

The upstream is our repository and is definitely not gone, so this
output is nonsense.

The fix is fairly obvious; just like the branch name is DWIMed when
"git pull" merges from the 'master' branch without complaint on such
a branch, the name of the branch the current branch builds upon
needs to be DWIMed the same way.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote: simplify match_name_with_pattern() using strbuf</title>
<updated>2014-09-22T19:40:27Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-09-21T08:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07bfa575c1ce741d0e33580c336596d3407129b6'/>
<id>urn:sha1:07bfa575c1ce741d0e33580c336596d3407129b6</id>
<content type='text'>
Make the code simpler and shorter by avoiding repetitive use of
string length variables and leaving memory allocation to strbuf
functions.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/prepare-revision-walk-error-check'</title>
<updated>2014-09-09T19:54:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-09T19:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=715b63ceb3c71fb748ec1e46680d96e025e9c75d'/>
<id>urn:sha1:715b63ceb3c71fb748ec1e46680d96e025e9c75d</id>
<content type='text'>
* sb/prepare-revision-walk-error-check:
  prepare_revision_walk(): check for return value in all places
</content>
</entry>
<entry>
<title>Merge branch 'sb/plug-leaks'</title>
<updated>2014-09-09T19:54:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-09T19:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27fbcf8267ecc484cafdbfe84a3aaf2f373f3e2a'/>
<id>urn:sha1:27fbcf8267ecc484cafdbfe84a3aaf2f373f3e2a</id>
<content type='text'>
* sb/plug-leaks:
  clone.c: don't leak memory in cmd_clone
  remote.c: don't leak the base branch name in format_tracking_info
</content>
</entry>
<entry>
<title>prepare_revision_walk(): check for return value in all places</title>
<updated>2014-08-12T18:00:33Z</updated>
<author>
<name>Stefan Beller</name>
<email>stefanbeller@gmail.com</email>
</author>
<published>2014-08-10T21:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c'/>
<id>urn:sha1:81c3ce3cdce8dffb913243f5b2cc09d9fb966e6c</id>
<content type='text'>
Even the documentation tells us:

	You should check if it returns any error (non-zero return
	code) and if it does not, you can start using get_revision()
	to do the iteration.

In preparation for this commit, I grepped all occurrences of
prepare_revision_walk and added error messages, when there were none.

Signed-off-by: Stefan Beller &lt;stefanbeller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
