Fix various issues around removal of untracked files/directories#1036
Fix various issues around removal of untracked files/directories#1036newren wants to merge 11 commits into
Conversation
8b91d4d to
c5ead19
Compare
6deb7ea to
6ea23d1
Compare
|
/submit |
|
Submitted as [email protected] To fetch this version into To fetch this version to local tag |
|
User |
|
User |
|
User |
|
This branch is now known as |
|
This patch series was integrated into seen via git@5f14903. |
|
This patch series was integrated into seen via git@fb21130. |
|
This patch series was integrated into seen via git@8d59692. |
|
There was a status update in the "New Topics" section about the branch Various fixes in code paths that move untracked files away to make room. |
|
This patch series was integrated into seen via git@0100454. |
|
This patch series was integrated into seen via git@728a014. |
|
This patch series was integrated into seen via git@ffe5043. |
|
This patch series was integrated into seen via git@3c92761. |
|
There was a status update in the "Cooking" section about the branch Various fixes in code paths that move untracked files away to make room. |
6ea23d1 to
993451a
Compare
|
/submit |
|
Submitted as [email protected] To fetch this version into To fetch this version to local tag |
|
User |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Elijah Newren wrote (reply to this): |
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this): |
|
On the Git mailing list, Junio C Hamano wrote (reply to this): |
|
This patch series was integrated into seen via git@f2d2174. |
|
There was a status update in the "Cooking" section about the branch Various fixes in code paths that move untracked files away to make room. Will merge to 'next'. |
|
On the Git mailing list, Elijah Newren wrote (reply to this): |
|
This patch series was integrated into seen via git@114b9ab. |
|
This patch series was integrated into next via git@fc4e387. |
|
There was a status update in the "Cooking" section about the branch Various fixes in code paths that move untracked files away to make room. Will merge to 'master'. |
|
This patch series was integrated into seen via git@13b5e0b. |
|
This patch series was integrated into seen via git@19c74ed. |
|
This patch series was integrated into seen via git@981cddf. |
|
There was a status update in the "Cooking" section about the branch Various fixes in code paths that move untracked files away to make room. Will merge to 'master'. |
|
This patch series was integrated into seen via git@063d9ea. |
|
This patch series was integrated into seen via git@a7c2daa. |
|
This patch series was integrated into next via git@a7c2daa. |
|
This patch series was integrated into master via git@a7c2daa. |
|
Closed via a7c2daa. |
NOTE: Junio said we should "take [v3] as we have them now", but still hasn't merged it down to next. So, I'm sending a v4 that is identical to v3 other than including Phillip's Acked-by.
We have multiple codepaths that delete untracked files/directories but shouldn't. There are also some codepaths where we delete untracked files/directories intentionally (based on mailing list discussion), but where that intent is not documented. We also have some codepaths that preserve ignored files, which shouldn't. Fix the documentation, add several new (mostly failing) testcases, fix some of the new testcases, and add comments about some potential remaining problems. (I found these as a side-effect of looking at [1], though [2] pointed out one explicitly while I was working on it.)
Note that I'm using Junio's declaration about checkout -f and reset --hard (and also presuming that since read-tree --reset is porcelain that its behavior should be left alone)[3] in this series.
Changes since v3:
Changes since v2 (all due to Junio's request to consolidate unpack_trees_options.dir handling):
Changes since v1:
read-tree -m -uor the various reset flavors run internally by rebase/sequencer); we can revisit that later.SIDENOTE about treating ignored files as precious:
The patches are now getting pretty close to being able to handle ignored files as precious. The only things left would be making merge pass the --no-overwrite-ignore option along to more backends, and adding the --no-overwrite-ignore option that both checkout and merge take to more commands. There's already comments in the code about what boolean would need to be set by that flag. And then perhaps also make a global core.overwrite_ignored config option to affect all of these. Granted, doing this would globally treat ignored files as precious rather than allowing them to be configured on a per-path basis, but honestly I think the idea of configuring ignored files as precious on a per-path basis sounds like insanity. (We have enough bugs with untracked and ignored files without adding yet another type. And, of course, configuring per-path rules sounds like lots of work for end users to configure. There may be additional reasons against it.) So, if someone wants to pursue the precious-ignored concept then I'd much rather see it done as a global setting. Just my $0.02.
[1] https://lore.kernel.org/git/[email protected]/
[2] https://lore.kernel.org/git/[email protected]/
[3] https://lore.kernel.org/git/[email protected]/
cc: Ævar Arnfjörð Bjarmason [email protected]
cc: Fedor Biryukov [email protected]
cc: Philip Oakley [email protected]
cc: Phillip Wood [email protected]
cc: Elijah Newren [email protected]
cc: Eric Sunshine [email protected]