git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git reset --merge documentation improvments

From
Vincent van Ravesteijn <vfr@lyx.org>
Date
Nov 23, 2011, 08:57 UTC
Message-ID
<4ECCB565.9020706@lyx.org>
In-Reply-To
<CAGK7Mr59bN8rjhLHAK0Vq=bOBBHG=N02CgGe-np=OBdTyS+rsA@mail.gmail.com>
Op 23-11-2011 9:31, Philippe Vaucher schreef:
Show 10 quoted lines
> 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".
Show 6 quoted lines
>
> 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
Previous: Philippe VaucherNext: Philippe Vaucher
Message 2 of 3 in “git reset --merge documentation improvments”
  1. Philippe VaucherNov 23, 2011
  2. Vincent van RavesteijnNov 23, 2011
  3. Philippe VaucherNov 23, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.