git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git reset --merge documentation improvments
@ 2011-11-23  8:31 Philippe Vaucher
  2011-11-23  8:57 ` Vincent van Ravesteijn
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Vaucher @ 2011-11-23  8:31 UTC (permalink / raw)
  To: git

Hello,

The current documentation for --merge is:

"Resets the index [1] and updates the files in the working tree that
are different between <commit> and HEAD, but keeps those which are
different between the index [2] and working tree"

I think this is confusing, because [1] is the *after-reset* index and
[2] is the *before-reset* index. If you fail to realise this it looks
like this "resets index (so index is empty) and then updates worktree
but skip files staged from index" --> "but there's nothing staged, the
index was reset!"

I think a better sentence would be:

"Updates the files in the working tree that are different between
<commit> and HEAD, but keeps those which are different between the
index and working tree, and finally resets the index."

Or something along those lines.

Philippe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git reset --merge documentation improvments
  2011-11-23  8:31 git reset --merge documentation improvments Philippe Vaucher
@ 2011-11-23  8:57 ` Vincent van Ravesteijn
  2011-11-23 11:39   ` Philippe Vaucher
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent van Ravesteijn @ 2011-11-23  8:57 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: git

Op 23-11-2011 9:31, Philippe Vaucher schreef:
> Hello,
>
> The current documentation for --merge is:
>
> "Resets the index [1] and updates the files in the working tree that
> are different between<commit>  and HEAD, but keeps those which are
> different between the index [2] and working tree"
>
> I think this is confusing, because [1] is the *after-reset* index and
> [2] is the *before-reset* index.

You mean that you read that the *after-reset* index is reset ? They both 
refer to the *before-reset* index.

>   If you fail to realise this it looks
> like this "resets index (so index is empty) and then updates worktree
> but skip files staged from index" -->  "but there's nothing staged, the
> index was reset!"

The misunderstanding comes from the added "then".

>
> I think a better sentence would be:
>
> "Updates the files in the working tree that are different between
> <commit>  and HEAD, but keeps those which are different between the
> index and working tree, and finally resets the index."

There is nothing to update as long as the index is not reset.

Vincent

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git reset --merge documentation improvments
  2011-11-23  8:57 ` Vincent van Ravesteijn
@ 2011-11-23 11:39   ` Philippe Vaucher
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Vaucher @ 2011-11-23 11:39 UTC (permalink / raw)
  To: Vincent van Ravesteijn; +Cc: git

>> "Updates the files in the working tree that are different between
>> <commit>  and HEAD, but keeps those which are different between the
>> index and working tree, and finally resets the index."
>
> There is nothing to update as long as the index is not reset.

Well then I simply don't understand what --merge does. Is it like
--keep but instead of failing when a file-to-be-overwritten has
changes it simply ignores the overwriting and continues?

Philippe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-23 11:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23  8:31 git reset --merge documentation improvments Philippe Vaucher
2011-11-23  8:57 ` Vincent van Ravesteijn
2011-11-23 11:39   ` Philippe Vaucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).