New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix various issues around removal of untracked files/directories #1036
Fix various issues around removal of untracked files/directories #1036
Conversation
8b91d4d
to
c5ead19
Compare
6deb7ea
to
6ea23d1
Compare
/submit |
Submitted as pull.1036.git.1632006923.gitgitgadget@gmail.com 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 pull.1036.v2.git.1632465429.gitgitgadget@gmail.com 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 -u
or 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/xmqqv93n7q1v.fsf@gitster.g/
[2] https://lore.kernel.org/git/C357A648-8B13-45C3-9388-C0C7F7D40DAE@gmail.com/
[3] https://lore.kernel.org/git/xmqqr1e2ejs9.fsf@gitster.g/
cc: Ævar Arnfjörð Bjarmason avarab@gmail.com
cc: Fedor Biryukov fedor.birjukov@gmail.com
cc: Philip Oakley philipoakley@iee.email
cc: Phillip Wood phillip.wood123@gmail.com
cc: Elijah Newren newren@gmail.com
cc: Eric Sunshine sunshine@sunshineco.com