diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-05-16 14:14:38 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-15 10:47:23 -0700 |
commit | 28e6a97e39edb84599693db971e36d793d36e413 (patch) | |
tree | 610a68dd8e91e16a77d19a696d210f4f7dd741d9 /compat/msvc.h | |
parent | refs.c: pass a list of names to skip to is_refname_available (diff) | |
download | tgif-28e6a97e39edb84599693db971e36d793d36e413.tar.xz |
refs.c: ref_transaction_commit: distinguish name conflicts from other errors
In _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either
when we lstat the new refname or if the name checking function reports that
the same type of conflict happened. In both cases, it means that we can not
create the new ref due to a name conflict.
Start defining specific return codes for _commit. TRANSACTION_NAME_CONFLICT
refers to a failure to create a ref due to a name conflict with another ref.
TRANSACTION_GENERIC_ERROR is for all other errors.
When "git fetch" is creating refs, name conflicts differ from other errors in
that they are likely to be resolved by running "git remote prune <remote>".
"git fetch" currently inspects errno to decide whether to give that advice.
Once it switches to the transaction API, it can check for
TRANSACTION_NAME_CONFLICT instead.
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/msvc.h')
0 files changed, 0 insertions, 0 deletions