diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2017-10-24 17:16:24 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-25 15:08:26 +0900 |
commit | 2e9de01aa0c44b539fca05b3ee552013d64c283a (patch) | |
tree | 2fd16844ba1d86135c291f3ac255b633b57b33e6 /urlmatch.h | |
parent | files_transaction_finish(): delete reflogs before references (diff) | |
download | tgif-2e9de01aa0c44b539fca05b3ee552013d64c283a.tar.xz |
t1404: add a bunch of tests of D/F conflicts
It is currently not allowed, in a single transaction, to add one
reference and delete another reference if the two reference names D/F
conflict with each other (e.g., like `refs/foo/bar` and `refs/foo`).
The reason is that the code would need to take locks
$GIT_DIR/refs/foo.lock
$GIT_DIR/refs/foo/bar.lock
But the latter lock couldn't coexist with the loose reference file
$GIT_DIR/refs/foo
, because `$GIT_DIR/refs/foo` cannot be both a directory and a file at
the same time (hence the name "D/F conflict).
Add a bunch of tests that we cleanly reject such transactions.
In fact, many of the new tests currently fail. They will be fixed in
the next commit along with an explanation.
Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'urlmatch.h')
0 files changed, 0 insertions, 0 deletions