<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.c, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-11-15T03:14:32Z</updated>
<entry>
<title>Merge branch 'js/for-each-ref-remote-name-and-ref'</title>
<updated>2017-11-15T03:14:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-15T03:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=093048b22913be23fe45635e8723d3aa3a185ff3'/>
<id>urn:sha1:093048b22913be23fe45635e8723d3aa3a185ff3</id>
<content type='text'>
The "--format=..." option "git for-each-ref" takes learned to show
the name of the 'remote' repository and the ref at the remote side
that is affected for 'upstream' and 'push' via "%(push:remotename)"
and friends.

* js/for-each-ref-remote-name-and-ref:
  for-each-ref: test :remotename and :remoteref
  for-each-ref: let upstream/push report the remote ref name
  for-each-ref: let upstream/push optionally report the remote name
</content>
</entry>
<entry>
<title>for-each-ref: let upstream/push report the remote ref name</title>
<updated>2017-11-08T01:18:23Z</updated>
<author>
<name>J Wyman</name>
<email>jwyman@microsoft.com</email>
</author>
<published>2017-11-07T16:31:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9700fae5ee93dd0928cb82afb7b2fd49295e28d2'/>
<id>urn:sha1:9700fae5ee93dd0928cb82afb7b2fd49295e28d2</id>
<content type='text'>
There are times when scripts want to know not only the name of the
push branch on the remote, but also the name of the branch as known
by the remote repository.

An example of this is when a tool wants to push to the very same branch
from which it would pull automatically, i.e. the `&lt;remote&gt;` and the `&lt;to&gt;`
in `git push &lt;remote&gt; &lt;from&gt;:&lt;to&gt;` would be provided by
`%(upstream:remotename)` and `%(upstream:remoteref)`, respectively.

This patch offers the new suffix :remoteref for the `upstream` and `push`
atoms, allowing to show exactly that. Example:

	$ cat .git/config
	...
	[remote "origin"]
		url = https://where.do.we.come/from
		fetch = refs/heads/*:refs/remote/origin/*
	[branch "master"]
		remote = origin
		merge = refs/heads/master
	[branch "develop/with/topics"]
		remote = origin
		merge = refs/heads/develop/with/topics
	...

	$ git for-each-ref \
		--format='%(push) %(push:remoteref)' \
		refs/heads
	refs/remotes/origin/master refs/heads/master
	refs/remotes/origin/develop/with/topics refs/heads/develop/with/topics

Signed-off-by: J Wyman &lt;jwyman@microsoft.com&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: convert dwim_ref and expand_ref to struct object_id</title>
<updated>2017-10-16T02:05:51Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-10-15T22:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cca5fa6406046c19ab5a8117fe71bf4402c00d88'/>
<id>urn:sha1:cca5fa6406046c19ab5a8117fe71bf4402c00d88</id>
<content type='text'>
All of the callers of these functions just pass the hash member of a
struct object_id, so convert them to use a pointer to struct object_id
directly.  Insert a check for NULL in expand_ref on a temporary basis;
this check can be removed when resolve_ref_unsafe is converted as well.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: convert read_ref and read_ref_full to object_id</title>
<updated>2017-10-16T02:05:50Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-10-15T22:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34c290a6fc8b1f6705d2646d726df2260927da0f'/>
<id>urn:sha1:34c290a6fc8b1f6705d2646d726df2260927da0f</id>
<content type='text'>
All but two of the call sites already have parameters using the hash
parameter of struct object_id, so convert them to take a pointer to the
struct directly.  Also convert refs_read_refs_full, the underlying
implementation.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: pass NULL to resolve_ref_unsafe() if hash is not needed</title>
<updated>2017-09-24T01:18:21Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-09-23T09:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=744c040b19412fa5075810eb1aced105fad96726'/>
<id>urn:sha1:744c040b19412fa5075810eb1aced105fad96726</id>
<content type='text'>
This allows us to get rid of some write-only variables, among them seven
SHA1 buffers.

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 'ma/up-to-date'</title>
<updated>2017-09-10T08:08:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-10T08:08:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e36002adda45a35c6fc4daf81913c3d2102cb59'/>
<id>urn:sha1:8e36002adda45a35c6fc4daf81913c3d2102cb59</id>
<content type='text'>
Message and doc updates.

* ma/up-to-date:
  treewide: correct several "up-to-date" to "up to date"
  Documentation/user-manual: update outdated example output
</content>
</entry>
<entry>
<title>treewide: correct several "up-to-date" to "up to date"</title>
<updated>2017-08-23T19:17:22Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2017-08-23T17:49:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7560f547e614244fe1d4648598d4facf7ed33a56'/>
<id>urn:sha1:7560f547e614244fe1d4648598d4facf7ed33a56</id>
<content type='text'>
Follow the Oxford style, which says to use "up-to-date" before the noun,
but "up to date" after it. Don't change plumbing (specifically
send-pack.c, but transport.c (git push) also has the same string).

This was produced by grepping for "up-to-date" and "up to date". It
turned out we only had to edit in one direction, removing the hyphens.

Fix a typo in Documentation/git-diff-index.txt while we're there.

Reported-by: Jeffrey Manian &lt;jeffrey.manian@gmail.com&gt;
Reported-by: STEVEN WHITE &lt;stevencharleswhitevoices@gmail.com&gt;
Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/hashmap-cleanup'</title>
<updated>2017-08-11T20:27:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-08-11T20:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55c965f3a27b3a36f84c56b6eba8ac5c95ff558a'/>
<id>urn:sha1:55c965f3a27b3a36f84c56b6eba8ac5c95ff558a</id>
<content type='text'>
Many uses of comparision callback function the hashmap API uses
cast the callback function type when registering it to
hashmap_init(), which defeats the compile time type checking when
the callback interface changes (e.g. gaining more parameters).
The callback implementations have been updated to take "void *"
pointers and cast them to the type they expect instead.

* sb/hashmap-cleanup:
  t/helper/test-hashmap: use custom data instead of duplicate cmp functions
  name-hash.c: drop hashmap_cmp_fn cast
  submodule-config.c: drop hashmap_cmp_fn cast
  remote.c: drop hashmap_cmp_fn cast
  patch-ids.c: drop hashmap_cmp_fn cast
  convert/sub-process: drop cast to hashmap_cmp_fn
  config.c: drop hashmap_cmp_fn cast
  builtin/describe: drop hashmap_cmp_fn cast
  builtin/difftool.c: drop hashmap_cmp_fn cast
  attr.c: drop hashmap_cmp_fn cast
</content>
</entry>
<entry>
<title>Merge branch 'bc/object-id'</title>
<updated>2017-08-11T20:26:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-08-11T20:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=df422678a800ffb1db8f3f146e2786f1cbf0059b'/>
<id>urn:sha1:df422678a800ffb1db8f3f146e2786f1cbf0059b</id>
<content type='text'>
Conversion from uchar[20] to struct object_id continues.

* bc/object-id:
  sha1_name: convert uses of 40 to GIT_SHA1_HEXSZ
  sha1_name: convert GET_SHA1* flags to GET_OID*
  sha1_name: convert get_sha1* to get_oid*
  Convert remaining callers of get_sha1 to get_oid.
  builtin/unpack-file: convert to struct object_id
  bisect: convert bisect_checkout to struct object_id
  builtin/update_ref: convert to struct object_id
  sequencer: convert to struct object_id
  remote: convert struct push_cas to struct object_id
  submodule: convert submodule config lookup to use object_id
  builtin/merge-tree: convert remaining caller of get_sha1 to object_id
  builtin/fsck: convert remaining caller of get_sha1 to object_id
</content>
</entry>
<entry>
<title>sha1_name: convert get_sha1* to get_oid*</title>
<updated>2017-07-17T20:54:51Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-07-13T23:49:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e82caf384bb3c7f41ec5419de04e6493d7b0f4a5'/>
<id>urn:sha1:e82caf384bb3c7f41ec5419de04e6493d7b0f4a5</id>
<content type='text'>
Now that all the callers of get_sha1 directly or indirectly use struct
object_id, rename the functions starting with get_sha1 to start with
get_oid.  Convert the internals in sha1_name.c to use struct object_id
as well, and eliminate explicit length checks where possible.  Convert a
use of 40 in get_oid_basic to GIT_SHA1_HEXSZ.

Outside of sha1_name.c and cache.h, this transition was made with the
following semantic patch:

@@
expression E1, E2;
@@
- get_sha1(E1, E2.hash)
+ get_oid(E1, &amp;E2)

@@
expression E1, E2;
@@
- get_sha1(E1, E2-&gt;hash)
+ get_oid(E1, E2)

@@
expression E1, E2;
@@
- get_sha1_committish(E1, E2.hash)
+ get_oid_committish(E1, &amp;E2)

@@
expression E1, E2;
@@
- get_sha1_committish(E1, E2-&gt;hash)
+ get_oid_committish(E1, E2)

@@
expression E1, E2;
@@
- get_sha1_treeish(E1, E2.hash)
+ get_oid_treeish(E1, &amp;E2)

@@
expression E1, E2;
@@
- get_sha1_treeish(E1, E2-&gt;hash)
+ get_oid_treeish(E1, E2)

@@
expression E1, E2;
@@
- get_sha1_commit(E1, E2.hash)
+ get_oid_commit(E1, &amp;E2)

@@
expression E1, E2;
@@
- get_sha1_commit(E1, E2-&gt;hash)
+ get_oid_commit(E1, E2)

@@
expression E1, E2;
@@
- get_sha1_tree(E1, E2.hash)
+ get_oid_tree(E1, &amp;E2)

@@
expression E1, E2;
@@
- get_sha1_tree(E1, E2-&gt;hash)
+ get_oid_tree(E1, E2)

@@
expression E1, E2;
@@
- get_sha1_blob(E1, E2.hash)
+ get_oid_blob(E1, &amp;E2)

@@
expression E1, E2;
@@
- get_sha1_blob(E1, E2-&gt;hash)
+ get_oid_blob(E1, E2)

@@
expression E1, E2, E3, E4;
@@
- get_sha1_with_context(E1, E2, E3.hash, E4)
+ get_oid_with_context(E1, E2, &amp;E3, E4)

@@
expression E1, E2, E3, E4;
@@
- get_sha1_with_context(E1, E2, E3-&gt;hash, E4)
+ get_oid_with_context(E1, E2, E3, E4)

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
