Re: [PATCH/RFC] stash: introduce 'stash save --keep-index' option

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: SZEDER <szeder@...>
Cc: Björn <B.Steinbrink@...>, Robert Anderson <rwa000@...>, Git Mailing List <git@...>
Date: Friday, June 27, 2008 - 2:26 pm

SZEDER Gábor <szeder@ira.uka.de> writes:


Please do not describe how it does, before what it does and what it is
good for.  Here is an example:

	When preparing for a partial commit (iow, committing only part of
	the changes you made in your work tree), you would use various
	forms of "git add" to prepare the index to a shape you think is
	appropriate for committing, and finally run "git commit".

	This workflow however has a flaw in that you are committing
	something that you could never have tested as a whole (and without
	any other modification) in your work tree.

	With the new "--keep-index" option, "git stash" takes a snapshot
	of your index and the work tree state, and updates the work tree
	to match your index, i.e. what you are about to commit.  This way,
	you can commit with confidence, knowing that you are committing
	what you saw (and hopefully tested) as a whole in your work tree.

	After making that initial commit, "git stash pop" will bring the
	work tree state back without touching the index, so you can start
	the next cycle of "git add" to prepare the second batch.

I do not know if your --keep-index implementation would actually allow the
above workflow; I haven't read the patch.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 2:50 am)
Re: An alternate model for preparing partial commits, David Jeske, (Fri Jun 27, 4:29 pm)
Re: An alternate model for preparing partial commits, Johannes Schindelin, (Fri Jun 27, 9:33 am)
Re: An alternate model for preparing partial commits, Junio C Hamano, (Fri Jun 27, 2:15 pm)
Re: An alternate model for preparing partial commits, Johannes Schindelin, (Sat Jun 28, 10:51 am)
Re: An alternate model for preparing partial commits, Robert Anderson, (Sat Jun 28, 3:03 am)
Re: An alternate model for preparing partial commits, Junio C Hamano, (Sat Jun 28, 5:53 pm)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 2:43 pm)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 1:14 pm)
Re: An alternate model for preparing partial commits, Dmitry Potapov, (Fri Jun 27, 10:14 pm)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 10:57 pm)
Re: An alternate model for preparing partial commits, Dmitry Potapov, (Sat Jun 28, 12:03 am)
Re: An alternate model for preparing partial commits, Stephen Sinclair, (Fri Jun 27, 4:31 pm)
Re: An alternate model for preparing partial commits, David Jeske, (Fri Jun 27, 4:45 pm)
Re: An alternate model for preparing partial commits, Wincent Colaiuta, (Sat Jun 28, 1:23 pm)
Re: An alternate model for preparing partial commits, Johannes Schindelin, (Fri Jun 27, 1:45 pm)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 1:49 pm)
Re: An alternate model for preparing partial commits, Miklos Vajna, (Fri Jun 27, 9:49 am)
Re: An alternate model for preparing partial commits, Petr Baudis, (Fri Jun 27, 4:50 am)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 1:02 pm)
Re: An alternate model for preparing partial commits, Johannes Sixt, (Fri Jun 27, 4:35 am)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 1:01 pm)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 12:54 pm)
Re: An alternate model for preparing partial commits, Robert Anderson, (Fri Jun 27, 1:34 pm)
Re: [PATCH/RFC] stash: introduce 'stash save --keep-index' o..., Junio C Hamano, (Fri Jun 27, 2:26 pm)