<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.h, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-02-17T19:25:18Z</updated>
<entry>
<title>refs.h: remove duplication in function docstrings</title>
<updated>2015-02-17T19:25:18Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d1dd721f11b7b124f35e347876e5d7204a3df664'/>
<id>urn:sha1:d1dd721f11b7b124f35e347876e5d7204a3df664</id>
<content type='text'>
Add more information to the comment introducing the four reference
transaction update functions, so that each function's docstring
doesn't have to repeat it. Add a pointer from the individual
functions' docstrings to the introductory comment.

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>update_ref(): improve documentation</title>
<updated>2015-02-17T19:25:03Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4b7b520b9f761704400a82285d0812fd9e50957f'/>
<id>urn:sha1:4b7b520b9f761704400a82285d0812fd9e50957f</id>
<content type='text'>
Add a docstring for update_ref(), emphasizing its similarity to
ref_transaction_update(). Rename its parameters to match those of
ref_transaction_update().

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref_transaction_verify(): new function to check a reference's value</title>
<updated>2015-02-17T19:24:59Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16180334015ab44b0310b9d896e554a66c36a1a4'/>
<id>urn:sha1:16180334015ab44b0310b9d896e554a66c36a1a4</id>
<content type='text'>
If NULL is passed to ref_transaction_update()'s new_sha1 parameter,
then just verify old_sha1 (under lock) without trying to change the
new value of the reference.

Use this functionality to add a new function ref_transaction_verify(),
which checks the current value of the reference under lock but doesn't
change it.

Use ref_transaction_verify() in the implementation of "git update-ref
--stdin"'s "verify" command to avoid the awkward need to "update" the
reference to its existing value.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref_transaction_delete(): remove "have_old" parameter</title>
<updated>2015-02-17T19:23:48Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb5a6bb61c215546b94156bbb54d43225424f7d0'/>
<id>urn:sha1:fb5a6bb61c215546b94156bbb54d43225424f7d0</id>
<content type='text'>
Instead, verify the reference's old value if and only if old_sha1 is
non-NULL.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref_transaction_update(): remove "have_old" parameter</title>
<updated>2015-02-17T19:22:50Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d147bdff0b8132d3aa53a46df8dbab7b673b796'/>
<id>urn:sha1:1d147bdff0b8132d3aa53a46df8dbab7b673b796</id>
<content type='text'>
Instead, verify the reference's old value if and only if old_sha1 is
non-NULL.

ref_transaction_delete() will get the same treatment in a moment.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs.c: change some "flags" to "unsigned int"</title>
<updated>2015-02-17T19:22:29Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fec14ec38ca65b13f9e0fcdb60f27674c6f9af70'/>
<id>urn:sha1:fec14ec38ca65b13f9e0fcdb60f27674c6f9af70</id>
<content type='text'>
Change the following functions' "flags" arguments from "int" to
"unsigned int":

 * ref_transaction_update()
 * ref_transaction_create()
 * ref_transaction_delete()
 * update_ref()
 * delete_ref()
 * lock_ref_sha1_basic()

Also change the "flags" member in "struct ref_update" to unsigned.

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: move REF_DELETING to refs.c</title>
<updated>2015-02-12T19:42:53Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-12T11:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=581d4e0cdbe9526c122b9d0835f951e478f82448'/>
<id>urn:sha1:581d4e0cdbe9526c122b9d0835f951e478f82448</id>
<content type='text'>
It is only used internally now. Document it a little bit better, too.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/reflog-expire'</title>
<updated>2015-02-11T21:43:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-11T21:43:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4d5c4e498a14af732f3b0b690f8b551d18610bfc'/>
<id>urn:sha1:4d5c4e498a14af732f3b0b690f8b551d18610bfc</id>
<content type='text'>
Restructure "reflog expire" to fit the reflogs better with the
recently updated ref API.

Looked reasonable (except that some shortlog entries stood out like
a sore thumb).

* mh/reflog-expire: (24 commits)
  refs.c: let fprintf handle the formatting
  refs.c: don't expose the internal struct ref_lock in the header file
  lock_any_ref_for_update(): inline function
  refs.c: remove unlock_ref/close_ref/commit_ref from the refs api
  reflog_expire(): new function in the reference API
  expire_reflog(): treat the policy callback data as opaque
  Move newlog and last_kept_sha1 to "struct expire_reflog_cb"
  expire_reflog(): move rewrite to flags argument
  expire_reflog(): move verbose to flags argument
  expire_reflog(): pass flags through to expire_reflog_ent()
  struct expire_reflog_cb: a new callback data type
  Rename expire_reflog_cb to expire_reflog_policy_cb
  expire_reflog(): move updateref to flags argument
  expire_reflog(): move dry_run to flags argument
  expire_reflog(): add a "flags" argument
  expire_reflog(): extract two policy-related functions
  Extract function should_expire_reflog_ent()
  expire_reflog(): use a lock_file for rewriting the reflog file
  expire_reflog(): return early if the reference has no reflog
  expire_reflog(): rename "ref" parameter to "refname"
  ...
</content>
</entry>
<entry>
<title>refs.c: don't expose the internal struct ref_lock in the header file</title>
<updated>2014-12-22T18:13:15Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2014-12-12T08:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3581d793351dba4e4a2f779a72f39d6ae84c1c2c'/>
<id>urn:sha1:3581d793351dba4e4a2f779a72f39d6ae84c1c2c</id>
<content type='text'>
Now the struct ref_lock is used completely internally, so let's
remove it from the header file.

Signed-off-by: Stefan Beller &lt;sbeller@google.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>lock_any_ref_for_update(): inline function</title>
<updated>2014-12-22T18:13:15Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-12-12T08:57:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31e07f76a946831265e741333a3d9e0646c793ad'/>
<id>urn:sha1:31e07f76a946831265e741333a3d9e0646c793ad</id>
<content type='text'>
Inline the function at its one remaining caller (which is within
refs.c) and remove 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>
</feed>
