Re: [PATCH 0/2] read-tree: improve untracked file support
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 1, 2019, 10:31 UTC
- Message-ID
- <CACsJy8CNUEBXmBcQnRHqdeFJtTvBuZ9thP7QPAw-ZOD+2ty3VA@mail.gmail.com>
- In-Reply-To
- <20190501101403.20294-1-phillip.wood123@gmail.com>
On Wed, May 1, 2019 at 5:14 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 11 quoted lines
> > From: Phillip Wood <phillip.wood@dunelm.org.uk> > > These two patches teach read-tree how to avoid overwriting untracked > files when doing '--reset -u' and also how to respect all of git's > standard excludes files. I'd like to see the porcelain commands stop > overwriting untracked files, this is a first step on the way. I'm not > sure if we want to add options to the porcelain commands to protect > untracked files or just change their behavior and add an option to > override that. I'm leaning towards the latter but I'd be interested to > hear what others think.
For new commands like git-restore, it's definitely a good thing to not overwrite untracked files. For existing commands I guess we have to go over them one by one. For "git reset --hard", it should really just overwrite whatever needed to get back to the known good state. "git checkout -f" , not so sure (seems weird that we need force-level-two option to override the protection provided by -f, if we change default behavior)
-- Duy