diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-05-01 11:16:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-15 10:47:23 -0700 |
commit | 5fe7d825da8af83a9a3b9bc7f3295f836b6e3a75 (patch) | |
tree | 0702b356afe1a2644fe903b7f75976dad4e1f5ef /compat/snprintf.c | |
parent | refs.c: call lock_ref_sha1_basic directly from commit (diff) | |
download | tgif-5fe7d825da8af83a9a3b9bc7f3295f836b6e3a75.tar.xz |
refs.c: pass a list of names to skip to is_refname_available
Change is_refname_available to take a list of strings to exclude when
checking for conflicts instead of just one single name. We can already
exclude a single name for the sake of renames. This generalizes that support.
ref_transaction_commit already tracks a set of refs that are being deleted
in an array. This array is then used to exclude refs from being written to
the packed-refs file. At some stage we will want to change this array to a
struct string_list and then we can pass it to is_refname_available via the
call to lock_ref_sha1_basic. That will allow us to perform transactions
that perform multiple renames as long as there are no conflicts within the
starting or ending state.
For example, that would allow a single transaction that contains two
renames that are both individually conflicting:
m -> n/n
n -> m/m
No functional change intended yet.
Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/snprintf.c')
0 files changed, 0 insertions, 0 deletions