<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.h, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-02-07T21:48:47Z</updated>
<entry>
<title>upload/receive-pack: allow hiding ref hierarchies</title>
<updated>2013-02-07T21:48:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-19T00:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=daebaa78137d59693a808c1f0bdec0ecb40fc12e'/>
<id>urn:sha1:daebaa78137d59693a808c1f0bdec0ecb40fc12e</id>
<content type='text'>
A repository may have refs that are only used for its internal
bookkeeping purposes that should not be exposed to the others that
come over the network.

Teach upload-pack to omit some refs from its initial advertisement
by paying attention to the uploadpack.hiderefs multi-valued
configuration variable.  Do the same to receive-pack via the
receive.hiderefs variable.  As a convenient short-hand, allow using
transfer.hiderefs to set the value to both of these variables.

Any ref that is under the hierarchies listed on the value of these
variable is excluded from responses to requests made by "ls-remote",
"fetch", etc. (for upload-pack) and "push" (for receive-pack).

Because these hidden refs do not count as OUR_REF, an attempt to
fetch objects at the tip of them will be rejected, and because these
refs do not get advertised, "git push :" will not see local branches
that have the same name as them as "matching" ones to be sent.

An attempt to update/delete these hidden refs with an explicit
refspec, e.g. "git push origin :refs/hidden/22", is rejected.  This
is not a new restriction.  To the pusher, it would appear that there
is no such ref, so its push request will conclude with "Now that I
sent you all the data, it is time for you to update the refs.  I saw
that the ref did not exist when I started pushing, and I want the
result to point at this commit".  The receiving end will apply the
compare-and-swap rule to this request and rejects the push with
"Well, your update request conflicts with somebody else; I see there
is such a ref.", which is the right thing to do. Otherwise a push to
a hidden ref will always be "the last one wins", which is not a good
default.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: store references hierarchically</title>
<updated>2012-04-10T22:55:55Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-04-10T05:30:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=432ad41e60cedb87ceec446ab034d46a53f5f9d8'/>
<id>urn:sha1:432ad41e60cedb87ceec446ab034d46a53f5f9d8</id>
<content type='text'>
Store references hierarchically in a tree that matches the
pseudo-directory structure of the reference names.  Add a new kind of
ref_entry (with flag REF_DIR) to represent a whole subdirectory of
references.  Sort ref_dirs one subdirectory at a time.

NOTE: the dirs can now be sorted as a side-effect of other function
calls.  Therefore, it would be problematic to do something from a
each_ref_fn callback that could provoke the sorting of a directory
that is currently being iterated over (i.e., the directory containing
the entry that is being processed or any of its parents).

This is a bit far-fetched, because a directory is always sorted just
before being iterated over.  Therefore, read-only accesses cannot
trigger the sorting of a directory whose iteration has already
started.  But if a callback function would add a reference to a parent
directory of the reference in the iteration, then try to resolve a
reference under that directory, a re-sort could be triggered and cause
the iteration to work incorrectly.

Nevertheless...add a comment in refs.h warning against modifications
during iteration.

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: remove the extra_refs API</title>
<updated>2012-02-13T03:50:39Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-02-11T06:21:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf6672edb1eb90ef7f79d37eca08c93a662802a8'/>
<id>urn:sha1:cf6672edb1eb90ef7f79d37eca08c93a662802a8</id>
<content type='text'>
The extra_refs provided a kludgy way to create fake references at a
global level in the hope that they would only affect some particular
code path.  The last user of this API been rewritten, so strip this
stuff out before somebody else gets the bad idea of using it.

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>add_packed_ref(): new function in the refs API.</title>
<updated>2012-01-17T19:55:04Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2012-01-17T05:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30249ee68fa5fa63bfb9bb417987b0547253b8e7'/>
<id>urn:sha1:30249ee68fa5fa63bfb9bb417987b0547253b8e7</id>
<content type='text'>
Add a new function add_packed_ref() that adds a reference directly to
the in-memory packed reference cache.  This will be useful for
creating local references while cloning.

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>resolve_gitlink_ref(): improve docstring</title>
<updated>2011-12-12T17:08:53Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2011-12-12T05:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f820bd92008a366f391e243fbd51e076d75e3a6'/>
<id>urn:sha1:7f820bd92008a366f391e243fbd51e076d75e3a6</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 parameters result -&gt; sha1</title>
<updated>2011-12-12T17:08:51Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2011-12-12T05:38:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=85be1fe34ab6bf67d232b1deb524c4af34d87222'/>
<id>urn:sha1:85be1fe34ab6bf67d232b1deb524c4af34d87222</id>
<content type='text'>
Try consistently to use the name "sha1" for parameters to which a SHA1
will be stored.

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 "refname" variables</title>
<updated>2011-12-12T17:08:51Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2011-12-12T05:38:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dfefa935ae050d859022017bf9d5d23f4238a7e5'/>
<id>urn:sha1:dfefa935ae050d859022017bf9d5d23f4238a7e5</id>
<content type='text'>
Try to consistently use the variable name "refname" when referring to
a string that names a reference.

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>Merge branch 'jc/broken-ref-dwim-fix'</title>
<updated>2011-10-21T23:04:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-21T23:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0445ba2457b066a70334877f2d638e1f7a974220'/>
<id>urn:sha1:0445ba2457b066a70334877f2d638e1f7a974220</id>
<content type='text'>
* jc/broken-ref-dwim-fix:
  resolve_ref(): report breakage to the caller without warning
  resolve_ref(): expose REF_ISBROKEN flag
  refs.c: move dwim_ref()/dwim_log() from sha1_name.c
</content>
</entry>
<entry>
<title>resolve_ref(): expose REF_ISBROKEN flag</title>
<updated>2011-10-19T20:58:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-19T20:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98ac34b2b1968e16fbf7f6122a53b73c6caaff49'/>
<id>urn:sha1:98ac34b2b1968e16fbf7f6122a53b73c6caaff49</id>
<content type='text'>
Instead of keeping this as an internal API, let the callers find
out the reason why resolve_ref() returned NULL is not because there
was no such file in $GIT_DIR but because a file was corrupt.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>invalidate_ref_cache(): expose this function in the refs API</title>
<updated>2011-10-17T04:10:49Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2011-10-17T02:38:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8be8bde75f90661ecd118ac890290889e184063d'/>
<id>urn:sha1:8be8bde75f90661ecd118ac890290889e184063d</id>
<content type='text'>
Make invalidate_ref_cache() an official part of the refs API.  It is
currently a fact of life that code outside of refs.c mucks about with
references.  This change gives such code a way of informing the refs
module that it should no longer trust its cache.

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>
