From: Junio C Hamano Date: Thu, 31 Mar 2011 21:44:15 GMT Subject: Re: [PATCH] reset: update help text Message-ID: <7v39m3j780.fsf@alter.siamese.dyndns.org> In-Reply-To: <20110331184246.GA19264@elie> Jonathan Nieder writes: > [1] Detailed semantics: for each path listed by "git diff --name-only > HEAD ": > > * if the worktree, index, and HEAD match, make the index and worktree > match . > > * otherwise, if it is "not easy" to keep local changes, error out. > We are not going to do a three-way merge. That is, > > - if the index matches neither HEAD nor , error out; > - if the index matches HEAD but not the worktree, error out. > > * otherwise, it is "easy", so keep local changes. > > - if the index already matches , leave the index and > worktree alone. > - if the index and worktree match HEAD, make them match the > instead. The latter item in the last "otherwise" is the same as the first "if all match, move to the one from the named commit", isn't it?