On Thu, Apr 25, 2019 at 5:02 PM Phillip Wood <phillip.wood123@xxxxxxxxx> wrote: > > On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: > > --discard-changes is a better name than --force for this option since > > it's what really happens. > > I didn't realize when I suggested the name that --force overwrites > untracked files as well as discarding changes from tracked files. I > think we should document that. It would be nice if read-tree --reset -u > took an optional argument so read-tree --reset=tracked -u would not > overwrite untracked files. Then we could have --discard-changes just > discard the changes and not overwrite untracked files. I had a quick > look at unpack trees and it looks like a fairly straight forward change > (famous last words) - perhaps I'll have a go at it next week. So, --discard-changes is all about tracked changes, and we may have --overwrite-untracked to cover the other part, and --force enables both? That does not sound so bad (and maybe a good cure for those "overwriting untracked" reports we've seen quite often lately). Good luck with unpack-trees.c. But if it turns out you're too busy, just let me know if want to hand that back to me. -- Duy