diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-07-20 15:19:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-15 15:29:54 -0700 |
commit | c0a5423b6f09f0c08749697b8d2860f956e905e9 (patch) | |
tree | d4933befe95fbce1ed236bc48908403a2c0948a4 /rerere.h | |
parent | rerere: handle leftover rr-cache/$ID directory and postimage files (diff) | |
download | tgif-c0a5423b6f09f0c08749697b8d2860f956e905e9.tar.xz |
rerere: delay the recording of preimage
We record the preimage only when there is no directory to record the
conflict we encountered, i.e. when $GIT_DIR/rr-cache/$ID does not
exist. As the plan is to allow multiple <preimage,postimage> pairs
as variants for the same conflict ID eventually, this logic needs to
go.
As the first step in that direction, stop the "did we create the
directory? Then we record the preimage" logic. Instead, we record
if a preimage does not exist when we saw a conflict in a path. Also
make sure that we remove a stale postimage, which most likely is
totally unrelated to the resolution of this new conflict, when we
create a new preimage under $ID when $GIT_DIR/rr-cache/$ID already
exists.
In later patches, we will further update this logic to be "do we
have <preimage,postimage> pair that cleanly resolve the current
conflicts? If not, record a new preimage as a new variant", but
that does not happen at this stage yet.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rerere.h')
0 files changed, 0 insertions, 0 deletions