On Thu, Apr 18, 2019 at 7:38 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > It would be an excellent addition to "restore-path" (and also to > "checkout [<tree-ish> [--]] pathspec") to give "--dry-run". Not > just because it is destructive, but because unlike "reset --hard", > it is selectively destructive. Having a way to make sure that the > given pathspec touches only the paths that the user intends to > recover from the tree-ish or the index would be valuable. Yep. I thought about that complicated pathspec stuff but forgot to mention. When you start using wildcards and magic, it's sometimes hard to predict the outcome on the first try. Also about git-checkout but that's kinda weird. git-checkout has two faces, the switching business is "safety first" and --dry-run does not make sense. The restoring paths can make use of --dry-run, but then we'll need to describe that this option only applies to one of the two cases, urghhh > But it is a new feature, and I'd think it can (and probably should) > be done as a follow-on series outside the main series you have been > working on. Let's make sure that we have the basics ready by the > end of this cycle. Yeah, it's not going to happen now. I will also drop "rm --staged" in the next reroll to stop expanding the scope of this series. "rm [--staged] [--worktree]" may come back, but now is not its time. -- Duy