Re: [PATCH] git-add: introduce --edit (to edit the diff vs. the index)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, 10 Apr 2009, Sverre Rabbelier wrote:

> On Fri, Apr 10, 2009 at 20:10, Johannes Schindelin 
> <Johannes.Schindelin@xxxxxx> > As others have mentioned, there _is_ a 
> reason we have a working directory.
> > Please understand this as a "I do not like the idea of editing the 
> > index directly at all".
> 
> I do not intend use it as a replacement of the working directory, but 
> mostly as a way to split up patches easier. Mainly to _remove_ lines 
> that I staged that I would like to be in a different patch in the series 
> (possibly after doing 'git reset --soft'). I always go through my a 
> longer patch series multiple times until I am satisfied with the result, 
> this addition would make that a lot easier.

Would not a much saner way be

	$ git reset HEAD^
	$ git add -p
	$ git stash save --keep-index
	# test it
	$ git commit
	$ git stash apply
	# test again
	$ git commit

Hmm?

BTW I do not like the "longness" of "git stash save --keep-index"; of 
course I could install an alias for that, but it feels wrong to have only 
a cumbersome to call something that should be part of a _lot_ of 
workflows.

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]