Thread (30 messages) flat view 30 messages, 4 authors, 2016-06-15
STALE3733d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 00/13] Improve "refs" module encapsulation

From: Michael Haggerty <hidden>
Date: 2016-06-15 23:05:11

Add functions to the reference API to

* Delete a bunch of references at once, but *without* failing the
  whole transaction if one of the deletions fails. This functionality
  is used by `git remote remove` and `git remote prune`.

* Create initial references during `git clone`. (During clone,
  references are written directly to the `packed-refs` file without
  any locking.)

Also move the remaining "refs" function declarations from `cache.h` to
`refs.h`.

This improves the encapsulation of the refs module. Especially, it
means that code outside of the refs module should no longer need to
care about the distinction between loose and packed references.

These patches are also available from my GitHub account [1] as branch
"init-delete-refs-api".

[1] https://github.com/mhagger/git

Michael Haggerty (13):
  delete_ref(): move declaration to refs.h
  remove_branches(): remove temporary
  delete_ref(): handle special case more explicitly
  delete_refs(): new function for the refs API
  delete_refs(): improve error message
  delete_refs(): convert error message to lower case
  prune_remote(): use delete_refs()
  repack_without_refs(): make function private
  initial_ref_transaction_commit(): function for initial ref creation
  refs: remove some functions from the module's public interface
  initial_ref_transaction_commit(): check for duplicate refs
  initial_ref_transaction_commit(): check for ref D/F conflicts
  refs: move the remaining ref module declarations to refs.h

 archive.c               |   1 +
 builtin/blame.c         |   1 +
 builtin/clone.c         |  19 ++++-
 builtin/fast-export.c   |   1 +
 builtin/fmt-merge-msg.c |   1 +
 builtin/init-db.c       |   1 +
 builtin/log.c           |   1 +
 builtin/remote.c        |  33 +-------
 cache.h                 |  68 ----------------
 refs.c                  | 167 +++++++++++++++++++++++++++++++++++---
 refs.h                  | 210 +++++++++++++++++++++++++++++++-----------------
 remote-testsvn.c        |   1 +
 12 files changed, 316 insertions(+), 188 deletions(-)

-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help