<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.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-22T04:18:59Z</updated>
<entry>
<title>log: add option to choose which refs to decorate</title>
<updated>2017-11-22T04:18:59Z</updated>
<author>
<name>Rafael Ascensão</name>
<email>rafa.almas@gmail.com</email>
</author>
<published>2017-11-21T21:33:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65516f586b69307f977cd67cc45513a296cabc25'/>
<id>urn:sha1:65516f586b69307f977cd67cc45513a296cabc25</id>
<content type='text'>
When `log --decorate` is used, git will decorate commits with all
available refs. While in most cases this may give the desired effect,
under some conditions it can lead to excessively verbose output.

Introduce two command line options, `--decorate-refs=&lt;pattern&gt;` and
`--decorate-refs-exclude=&lt;pattern&gt;` to allow the user to select which
refs are used in decoration.

When "--decorate-refs=&lt;pattern&gt;" is given, only the refs that match the
pattern are used in decoration. The refs that match the pattern when
"--decorate-refs-exclude=&lt;pattern&gt;" is given, are never used in
decoration.

These options follow the same convention for mixing negative and
positive patterns across the system, assuming that the inclusive default
is to match all refs available.

 (1) if there is no positive pattern given, pretend as if an
     inclusive default positive pattern was given;

 (2) for each candidate, reject it if it matches no positive
     pattern, or if it matches any one of the negative patterns.

The rules for what is considered a match are slightly different from the
rules used elsewhere.

Commands like `log --glob` assume a trailing '/*' when glob chars are
not present in the pattern. This makes it difficult to specify a single
ref.  On the other hand, commands like `describe --match --all` allow
specifying exact refs, but do not have the convenience of allowing
"shorthand refs" like 'refs/heads' or 'heads' to refer to
'refs/heads/*'.

The commands introduced in this patch consider a match if:

  (a) the pattern contains globs chars,
	and regular pattern matching returns a match.

  (b) the pattern does not contain glob chars,
         and ref '&lt;pattern&gt;' exists, or if ref exists under '&lt;pattern&gt;/'

This allows both behaviours (allowing single refs and shorthand refs)
yet remaining compatible with existent commands.

Helped-by: Kevin Daudt &lt;me@ikke.info&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Rafael Ascensão &lt;rafa.almas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: update some more docs to use "oid" rather than "sha1"</title>
<updated>2017-11-06T01:31:08Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2017-11-05T08:42:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=78fb457968591887ebb331d3d0475c00c7dbb317'/>
<id>urn:sha1:78fb457968591887ebb331d3d0475c00c7dbb317</id>
<content type='text'>
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>ref_transaction_add_update(): remove a check</title>
<updated>2017-11-06T01:31:07Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2017-11-05T08:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=62c72d1fd0aa39429011b76ff5b1953a561e6581'/>
<id>urn:sha1:62c72d1fd0aa39429011b76ff5b1953a561e6581</id>
<content type='text'>
We want to make `REF_ISPRUNING` internal to the files backend. For
this to be possible, `ref_transaction_add_update()` mustn't know about
it. So move the check that `REF_ISPRUNING` is only used with
`REF_NODEREF` from this function to `files_transaction_prepare()`.

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>ref_transaction_update(): die on disallowed flags</title>
<updated>2017-11-06T01:31:07Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2017-11-05T08:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9bbbcec0d863d719dd4ae39fc2242b32c2008e7'/>
<id>urn:sha1:a9bbbcec0d863d719dd4ae39fc2242b32c2008e7</id>
<content type='text'>
Callers shouldn't be passing disallowed flags into
`ref_transaction_update()`. So instead of masking them off, treat it
as a bug if any are set.

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: convert read_raw_ref backends to struct object_id</title>
<updated>2017-10-16T02:05:52Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-10-15T22:07:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=99afe91a6c3a37b7bb32c824f19b1b51712fe6f3'/>
<id>urn:sha1:99afe91a6c3a37b7bb32c824f19b1b51712fe6f3</id>
<content type='text'>
Convert the unsigned char * parameter to struct object_id * for
files_read_raw_ref and packed_read_raw_ref.  Update the documentation.
Switch from using get_sha1_hex and a hard-coded 40 to using
parse_oid_hex.

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 peel_object to struct object_id</title>
<updated>2017-10-16T02:05:52Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-10-15T22:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ac2ed0d7d51e5c0b402797ecf01f38e9bfc82e0e'/>
<id>urn:sha1:ac2ed0d7d51e5c0b402797ecf01f38e9bfc82e0e</id>
<content type='text'>
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 resolve_ref_unsafe 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:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49e61479be913f67e66bb3fdf8de9475c41b58bd'/>
<id>urn:sha1:49e61479be913f67e66bb3fdf8de9475c41b58bd</id>
<content type='text'>
Convert resolve_ref_unsafe to take a pointer to struct object_id by
converting one remaining caller to use struct object_id, removing the
temporary NULL pointer check in expand_ref, converting the declaration
and definition, and applying the following semantic patch:

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

@@
expression E1, E2, E3, E4;
@@
- resolve_ref_unsafe(E1, E2, E3-&gt;hash, E4)
+ resolve_ref_unsafe(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>
<entry>
<title>refs: convert resolve_gitlink_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:07:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a98e6101f01b6991e780fc0b75f2937615fa84a9'/>
<id>urn:sha1:a98e6101f01b6991e780fc0b75f2937615fa84a9</id>
<content type='text'>
Convert the declaration and definition of resolve_gitlink_ref to use
struct object_id and apply the following semantic patch:

@@
expression E1, E2, E3;
@@
- resolve_gitlink_ref(E1, E2, E3.hash)
+ resolve_gitlink_ref(E1, E2, &amp;E3)

@@
expression E1, E2, E3;
@@
- resolve_gitlink_ref(E1, E2, E3-&gt;hash)
+ resolve_gitlink_ref(E1, E2, E3)

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 reflog_expire parameter 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:07:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0155f710b856970dc1dc5261e740f135c67a7b1d'/>
<id>urn:sha1:0155f710b856970dc1dc5261e740f135c67a7b1d</id>
<content type='text'>
reflog_expire already used struct object_id internally, but it did not
take it as a parameter.  Adjust the parameter (and the callers) to pass
a pointer to struct object_id instead of a pointer to unsigned char.
Remove the temporary inserted earlier as it is no longer required.

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_at 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:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8eb36d9422a04a30ecc54fd69b4f836eafd10637'/>
<id>urn:sha1:8eb36d9422a04a30ecc54fd69b4f836eafd10637</id>
<content type='text'>
Convert the callers and internals, including struct read_ref_at_cb, of
read_ref_at to use struct object_id.

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>
