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

Re: [PATCH] Documentation: reset: describe new "--keep" option

From
PBPeter Baumann <waste.manager@gmx.de>
Date
Mar 8, 2010, 08:47 UTC
Message-ID
<20100308084745.GB4827@m62s10.vlinux.de>
In-Reply-To
<201003072138.18583.chriscool@tuxfamily.org>
On Sun, Mar 07, 2010 at 09:38:18PM +0100, Christian Couder wrote:
Show 27 quoted lines
> On Sunday 07 March 2010 06:52:46 Junio C Hamano wrote:
> > Christian Couder <chriscool@tuxfamily.org> writes:
> > > and give an example to show how it can be used.
> > >
> > > Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> > > Signed-off-by: Junio C Hamano <gitster@pobox.com>
> > > ---
> > 
> > Thanks.  With the example I think I can tell others that this at least has
> > one known use case that is not totally whacky.
> > 
> > I haven't re-read Peter Baumann's comments that you dismissed as a
> > mis-reading of your added documentation, but if somebody _can_ misread
> > what you wrote, that is a sign that it has a room to be improved for
> > clarity.
> 
> Ok, so instead of:
> 
> > +--keep::
> > +     Resets the index to match the tree recorded by the named commit,
> > +     but keep changes in the working tree. Aborts if the reset would
> > +     change files that are already modified in the working tree.
> 
> what about:
> 
> --keep::
>      Resets the index to match the tree recorded by the named commit,

My reading of this (non native english speaker): Given the --keep flag, *only* the index is updated.

>      but changed files in the working tree are kept untouched. 
>      Aborts if the reset would touch any of them.

Huh? Does it touch the work tree, too? You propably know by now where this leads :-)

I have to admit I like Junio's version better, because at least it is clear that the worktree is also touched.

-- Peter

Previous: Christian Couder
Message 8 of 8 in “Documentation: reset: describe new "--keep" option”
  1. Documentation: reset: describe new "--keep" optionChristian Couder, Mar 5, 2010
  2. Peter BaumannMar 6, 2010
  3. Christian CouderMar 6, 2010
  4. Junio C HamanoMar 8, 2010
  5. Christian CouderMar 8, 2010
  6. Junio C HamanoMar 7, 2010
  7. Christian CouderMar 7, 2010
  8. Peter BaumannMar 8, 2010

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.