<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs, 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:29Z</updated>
<entry>
<title>Merge branch 'mh/tidy-ref-update-flags'</title>
<updated>2017-11-15T03:14:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-15T03:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a97222978ab3e0e86e87dccacf59269a9060de9e'/>
<id>urn:sha1:a97222978ab3e0e86e87dccacf59269a9060de9e</id>
<content type='text'>
Code clean-up in refs API implementation.

* mh/tidy-ref-update-flags:
  refs: update some more docs to use "oid" rather than "sha1"
  write_packed_entry(): take `object_id` arguments
  refs: rename constant `REF_ISPRUNING` to `REF_IS_PRUNING`
  refs: rename constant `REF_NODEREF` to `REF_NO_DEREF`
  refs: tidy up and adjust visibility of the `ref_update` flags
  ref_transaction_add_update(): remove a check
  ref_transaction_update(): die on disallowed flags
  prune_ref(): call `ref_transaction_add_update()` directly
  files_transaction_prepare(): don't leak flags to packed transaction
</content>
</entry>
<entry>
<title>Merge branch 'mh/avoid-rewriting-packed-refs'</title>
<updated>2017-11-15T03:14:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-15T03:14:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffb0b5762e903acc146cb21525f3c643de6facce'/>
<id>urn:sha1:ffb0b5762e903acc146cb21525f3c643de6facce</id>
<content type='text'>
Recent update to the refs infrastructure implementation started
rewriting packed-refs file more often than before; this has been
optimized again for most trivial cases.

* mh/avoid-rewriting-packed-refs:
  files-backend: don't rewrite the `packed-refs` file unnecessarily
  t1409: check that `packed-refs` is not rewritten unnecessarily
</content>
</entry>
<entry>
<title>Merge branch 'bc/object-id'</title>
<updated>2017-11-06T05:24:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-06T05:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7e456f5007f30997e48dec57a1fc09b6b0f071e'/>
<id>urn:sha1:e7e456f5007f30997e48dec57a1fc09b6b0f071e</id>
<content type='text'>
Conversion from uchar[20] to struct object_id continues.

* bc/object-id: (25 commits)
  refs/files-backend: convert static functions to object_id
  refs: convert read_raw_ref backends to struct object_id
  refs: convert peel_object to struct object_id
  refs: convert resolve_ref_unsafe to struct object_id
  worktree: convert struct worktree to object_id
  refs: convert resolve_gitlink_ref to struct object_id
  Convert remaining callers of resolve_gitlink_ref to object_id
  sha1_file: convert index_path and index_fd to struct object_id
  refs: convert reflog_expire parameter to struct object_id
  refs: convert read_ref_at to struct object_id
  refs: convert peel_ref to struct object_id
  builtin/pack-objects: convert to struct object_id
  pack-bitmap: convert traverse_bitmap_commit_list to object_id
  refs: convert dwim_log to struct object_id
  builtin/reflog: convert remaining unsigned char uses to object_id
  refs: convert dwim_ref and expand_ref to struct object_id
  refs: convert read_ref and read_ref_full to object_id
  refs: convert resolve_refdup and refs_resolve_refdup to struct object_id
  Convert check_connected to use struct object_id
  refs: update ref transactions to use struct object_id
  ...
</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>write_packed_entry(): take `object_id` arguments</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:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=417018826285140f9e948649ff9cf75a193075d2'/>
<id>urn:sha1:417018826285140f9e948649ff9cf75a193075d2</id>
<content type='text'>
Change `write_packed_entry()` to take `struct object_id *` rather than
`unsigned char *` arguments.

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_ISPRUNING` to `REF_IS_PRUNING`</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:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=acedcde76db257e4822291a180d5985852f8e621'/>
<id>urn:sha1:acedcde76db257e4822291a180d5985852f8e621</id>
<content type='text'>
Underscores are cheap, and help readability.

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>
<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>prune_ref(): call `ref_transaction_add_update()` directly</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:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b00f3cfa92d10d7180e6baf01d570eb904b5a592'/>
<id>urn:sha1:b00f3cfa92d10d7180e6baf01d570eb904b5a592</id>
<content type='text'>
`prune_ref()` needs to use the `REF_ISPRUNING` flag, but we want to
make that flag private to the files backend. So instead of calling
`ref_transaction_delete()`, which is a public function and therefore
shouldn't allow the `REF_ISPRUNING` flag, change `prune_ref()` to call
`ref_transaction_add_update()`, which is private to the refs
module. (Note that we don't need any of the other services provided by
`ref_transaction_delete()`.)

This allows us to change `ref_transaction_update()` to reject the
`REF_ISPRUNING` flag. Do so by adjusting
`REF_TRANSACTION_UPDATE_ALLOWED_FLAGS`. Also add parentheses to its
definition to avoid potential future mishaps.

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>
