<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.h, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-05-08T06:59:21Z</updated>
<entry>
<title>Merge branch 'sb/object-store-replace'</title>
<updated>2018-05-08T06:59:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-08T06:59:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=174774cd519846616edc475fcbc98237409ffc21'/>
<id>urn:sha1:174774cd519846616edc475fcbc98237409ffc21</id>
<content type='text'>
The effort to pass the repository in-core structure throughout the
API continues.  This round deals with the code that implements the
refs/replace/ mechanism.

* sb/object-store-replace:
  replace-object: allow lookup_replace_object to handle arbitrary repositories
  replace-object: allow do_lookup_replace_object to handle arbitrary repositories
  replace-object: allow prepare_replace_object to handle arbitrary repositories
  refs: allow for_each_replace_ref to handle arbitrary repositories
  refs: store the main ref store inside the repository struct
  replace-object: add repository argument to lookup_replace_object
  replace-object: add repository argument to do_lookup_replace_object
  replace-object: add repository argument to prepare_replace_object
  refs: add repository argument to for_each_replace_ref
  refs: add repository argument to get_main_ref_store
  replace-object: check_replace_refs is safe in multi repo environment
  replace-object: eliminate replace objects prepared flag
  object-store: move lookup_replace_object to replace-object.h
  replace-object: move replace_map to object store
  replace_object: use oidmap
</content>
</entry>
<entry>
<title>refs: allow for_each_replace_ref to handle arbitrary repositories</title>
<updated>2018-04-12T02:38:56Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-12T00:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0d296c57aec3a2c311abc5ebe7d1499bc41bc9df'/>
<id>urn:sha1:0d296c57aec3a2c311abc5ebe7d1499bc41bc9df</id>
<content type='text'>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: store the main ref store inside the repository struct</title>
<updated>2018-04-12T02:38:56Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-12T00:21:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64a741619d27ede27788d2d444257635f4af8ffd'/>
<id>urn:sha1:64a741619d27ede27788d2d444257635f4af8ffd</id>
<content type='text'>
This moves the 'main_ref_store', which was a global variable in refs.c
into the repository struct.

This patch does not deal with the parts in the refs subsystem which deal
with the submodules there. A later patch needs to get rid of the submodule
exposure in the refs API, such as 'get_submodule_ref_store(path)'.

Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: add repository argument to for_each_replace_ref</title>
<updated>2018-04-12T02:38:56Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-12T00:21:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=60ce76d35819a9679104b6615aa0466ae49023a0'/>
<id>urn:sha1:60ce76d35819a9679104b6615aa0466ae49023a0</id>
<content type='text'>
Add a repository argument to allow for_each_replace_ref callers to be
more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: add repository argument to get_main_ref_store</title>
<updated>2018-04-12T02:38:56Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-12T00:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23a3f0cb16caa1cc79cf0af42a92bff61fe955a4'/>
<id>urn:sha1:23a3f0cb16caa1cc79cf0af42a92bff61fe955a4</id>
<content type='text'>
Add a repository argument to allow the get_main_ref_store caller
to be more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ls-remote: pass ref prefixes when requesting a remote's refs</title>
<updated>2018-03-15T19:01:08Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2018-03-15T17:31:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4be74105febef5c6235e1e2f1e468e76166cad8'/>
<id>urn:sha1:b4be74105febef5c6235e1e2f1e468e76166cad8</id>
<content type='text'>
Construct an argv_array of ref prefixes based on the patterns supplied
via the command line and pass them to 'transport_get_remote_refs()' to
be used when communicating protocol v2 so that the server can limit the
ref advertisement based on those prefixes.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>refs: rename constant `REF_NODEREF` to `REF_NO_DEREF`</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:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=91774afcc30c7e8ffdf7b3e587d52c340684364f'/>
<id>urn:sha1:91774afcc30c7e8ffdf7b3e587d52c340684364f</id>
<content type='text'>
Even after working with this code for years, I still see this constant
name as "ref node ref". Rename it to make it's meaning clearer.

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: tidy up and adjust visibility of the `ref_update` 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:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ac95fee3d6f77867a627a713f9aa72dc32be18f'/>
<id>urn:sha1:5ac95fee3d6f77867a627a713f9aa72dc32be18f</id>
<content type='text'>
The constants used for `ref_update::flags` were rather disorganized:

* The definitions in `refs.h` were not close to the functions that
  used them.

* Maybe constants were defined in `refs-internal.h`, making them
  visible to the whole refs module, when in fact they only made sense
  for the files backend.

* Their documentation wasn't very consistent and partly still referred
  to sha1s rather than oids.

* The numerical values followed no rational scheme

Fix all of these problems. The main functional improvement is that
some constants' visibility is now limited to `files-backend.c`.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
