<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-04-26T06:39:13Z</updated>
<entry>
<title>Merge branch 'mh/separate-ref-cache'</title>
<updated>2017-04-26T06:39:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-26T06:39:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77b34eaa0777020abb41096106e1c2f19b0a87c5'/>
<id>urn:sha1:77b34eaa0777020abb41096106e1c2f19b0a87c5</id>
<content type='text'>
The internals of the refs API around the cached refs has been
streamlined.

* mh/separate-ref-cache:
  do_for_each_entry_in_dir(): delete function
  files_pack_refs(): use reference iteration
  commit_packed_refs(): use reference iteration
  cache_ref_iterator_begin(): make function smarter
  get_loose_ref_cache(): new function
  get_loose_ref_dir(): function renamed from get_loose_refs()
  do_for_each_entry_in_dir(): eliminate `offset` argument
  refs: handle "refs/bisect/" in `loose_fill_ref_dir()`
  ref-cache: use a callback function to fill the cache
  refs: record the ref_store in ref_cache, not ref_dir
  ref-cache: introduce a new type, ref_cache
  refs: split `ref_cache` code into separate files
  ref-cache: rename `remove_entry()` to `remove_entry_from_dir()`
  ref-cache: rename `find_ref()` to `find_ref_entry()`
  ref-cache: rename `add_ref()` to `add_ref_entry()`
  refs_verify_refname_available(): use function in more places
  refs_verify_refname_available(): implement once for all backends
  refs_ref_iterator_begin(): new function
  refs_read_raw_ref(): new function
  get_ref_dir(): don't call read_loose_refs() for "refs/bisect"
</content>
</entry>
<entry>
<title>Merge branch 'jk/quarantine-received-objects'</title>
<updated>2017-04-24T05:07:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-24T05:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f1384f711e4d04d7808d4e24860b17f656b7333'/>
<id>urn:sha1:9f1384f711e4d04d7808d4e24860b17f656b7333</id>
<content type='text'>
Add finishing touches to a recent topic.

* jk/quarantine-received-objects:
  refs: reject ref updates while GIT_QUARANTINE_PATH is set
  receive-pack: document user-visible quarantine effects
  receive-pack: drop tmp_objdir_env from run_update_hook
</content>
</entry>
<entry>
<title>Merge branch 'nd/files-backend-git-dir'</title>
<updated>2017-04-20T04:37:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-20T04:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ab8f2261fa2b595abe433dd50be0f2aaec14aa0'/>
<id>urn:sha1:5ab8f2261fa2b595abe433dd50be0f2aaec14aa0</id>
<content type='text'>
The "submodule" specific field in the ref_store structure is
replaced with a more generic "gitdir" that can later be used also
when dealing with ref_store that represents the set of refs visible
from the other worktrees.

* nd/files-backend-git-dir: (28 commits)
  refs.h: add a note about sorting order of for_each_ref_*
  t1406: new tests for submodule ref store
  t1405: some basic tests on main ref store
  t/helper: add test-ref-store to test ref-store functions
  refs: delete pack_refs() in favor of refs_pack_refs()
  files-backend: avoid ref api targeting main ref store
  refs: new transaction related ref-store api
  refs: add new ref-store api
  refs: rename get_ref_store() to get_submodule_ref_store() and make it public
  files-backend: replace submodule_allowed check in files_downcast()
  refs: move submodule code out of files-backend.c
  path.c: move some code out of strbuf_git_path_submodule()
  refs.c: make get_main_ref_store() public and use it
  refs.c: kill register_ref_store(), add register_submodule_ref_store()
  refs.c: flatten get_ref_store() a bit
  refs: rename lookup_ref_store() to lookup_submodule_ref_store()
  refs.c: introduce get_main_ref_store()
  files-backend: remove the use of git_path()
  files-backend: add and use files_ref_path()
  files-backend: add and use files_reflog_path()
  ...
</content>
</entry>
<entry>
<title>refs_verify_refname_available(): implement once for all backends</title>
<updated>2017-04-17T04:32:45Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2017-04-16T06:41:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b05855b5bcaf07fe8a636e621bd9d12d51963b5a'/>
<id>urn:sha1:b05855b5bcaf07fe8a636e621bd9d12d51963b5a</id>
<content type='text'>
It turns out that we can now implement
`refs_verify_refname_available()` based on the other virtual
functions, so there is no need for it to be defined at the backend
level. Instead, define it once in `refs.c` and remove the
`files_backend` definition.

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: reject ref updates while GIT_QUARANTINE_PATH is set</title>
<updated>2017-04-17T01:19:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-04-10T22:14:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d8f4481c4f03132174b514f428cd67d2cc0dc997'/>
<id>urn:sha1:d8f4481c4f03132174b514f428cd67d2cc0dc997</id>
<content type='text'>
As documented in git-receive-pack(1), updating a ref from
within the pre-receive hook is dangerous and can corrupt
your repo. This patch forbids ref updates entirely during
the hook to make it harder for adventurous hook writers to
shoot themselves in the foot.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs_ref_iterator_begin(): new function</title>
<updated>2017-04-14T10:54:31Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2017-03-20T16:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e121b9cb5f358c9779e02a2bf96fc545a896ab13'/>
<id>urn:sha1:e121b9cb5f358c9779e02a2bf96fc545a896ab13</id>
<content type='text'>
Extract a new function from `do_for_each_ref()`. It will be useful
elsewhere.

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_read_raw_ref(): new function</title>
<updated>2017-04-14T10:54:31Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2017-03-20T16:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=470be518623b0ca7a30bdb1fcef483f63a8e72ec'/>
<id>urn:sha1:470be518623b0ca7a30bdb1fcef483f63a8e72ec</id>
<content type='text'>
Extract a new function from `refs_resolve_ref_unsafe()`. It will be
useful elsewhere.

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: delete pack_refs() in favor of refs_pack_refs()</title>
<updated>2017-04-14T10:53:25Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2017-03-26T02:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c744782abdc0c6fdf0fd4eae2a790ea2631f1c4'/>
<id>urn:sha1:7c744782abdc0c6fdf0fd4eae2a790ea2631f1c4</id>
<content type='text'>
It only has one caller, not worth keeping just for convenience.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: new transaction related ref-store api</title>
<updated>2017-04-14T10:53:25Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2017-03-26T02:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c0fe4e8ba3db828079f1288169a94294e713b3d8'/>
<id>urn:sha1:c0fe4e8ba3db828079f1288169a94294e713b3d8</id>
<content type='text'>
The transaction struct now takes a ref store at creation and will
operate on that ref store alone.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: add new ref-store api</title>
<updated>2017-04-14T10:53:25Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2017-03-26T02:42:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d2df051d05bc65a0a540ba080f07b421b4d99d7'/>
<id>urn:sha1:7d2df051d05bc65a0a540ba080f07b421b4d99d7</id>
<content type='text'>
This is not meant to cover all existing API. It adds enough to test ref
stores with the new test program test-ref-store, coming soon and to be
used by files-backend.c.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
