[PATCH 0/1] reset: fix mixed reset when using sparse-checkout
- Date: Fri, 8 Sep 2017 12:00:49 -0600
- From: Kevin Willford <kewillf@xxxxxxxxxxxxx>
- Subject: [PATCH 0/1] reset: fix mixed reset when using sparse-checkout
Original discussion is here
When running a reset mixed and using the sparse-checkout the working
directory needs to be updated so that there is not data loss when the
index is updated. This is because the index is getting updated
potentially removing entries without changing the working directory.
When using the sparse-checkout feature the entries removed might not
be on disk and are lost.
This patch writes the before version of the file to disk if the mixed
reset is going to change the index of a file that had the skip-wortree
bit so that the file contents before the reset is preserved on disk and
status will reports the correct results.
Kevin Willford (1):
reset: fix reset when using the sparse-checkout feature.
builtin/reset.c | 25 +++++++++++++++++
t/t7114-reset-sparse-checkout.sh | 60 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+)
create mode 100755 t/t7114-reset-sparse-checkout.sh