git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [STGIT] stg refresh wish (splitting patches/removing files from a patch)
@ 2007-12-30 19:03 Peter Oberndorfer
  2008-01-02 19:39 ` [STG PATCH] refresh: add a --index option which takes the contents of the index as the new commit Peter Oberndorfer
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Oberndorfer @ 2007-12-30 19:03 UTC (permalink / raw)
  To: Git Mailing List

Hi,
I recently tried to split a stgit patch into 2 parts
and it was not as easy as i would like it to be.

How do i exclude a file from a patch(use version of file present in HEAD^)
without modifying the working dir?

with plain git i would use something like
git reset HEAD^ files_i_do_not_want_in_first_patch
git commit --amend
git add files_i_do_not_want_in_first_patch
git commit

So my idea was to add a --use-index [1] option to stg refresh
When it is passed stg refresh will use the current index for the contenst of the refreshed patch 
instead of looking at the working dir.
This would solve my problem[2] and also make it possible to use git-gui for 
staging hunks.

Do you think this would be a useful/good idea?
Or do we want a separate command for removing files from a patch anyway?

Another thing that might be useful (in my scenario) would be a stg commit --top extension
which commits at the top end of the stack
(unfortunately this will loose the patch history for splitting commits)
then i can edit this commits without being afraid of confusing stgit
and then stg assimilate /stg repair to make them managed by stg again

Greetings Peter

[1] rename by desire

[2] new way for splitting a patch with extension
git reset HEAD^ files_i_do_not_want_in_first_patch
stg refresh --use-index
stg refresh -e
git add files_i_do_not_want_in_first_patch
stg new
stg refresh --use-index

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

end of thread, other threads:[~2008-01-10  1:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-30 19:03 [STGIT] stg refresh wish (splitting patches/removing files from a patch) Peter Oberndorfer
2008-01-02 19:39 ` [STG PATCH] refresh: add a --index option which takes the contents of the index as the new commit Peter Oberndorfer
2008-01-07 10:56   ` Karl Hasselström
2008-01-07 10:59     ` Karl Hasselström
2008-01-08 20:42     ` [STG PATCH] add a --index option to refresh " Peter Oberndorfer
2008-01-09  7:23       ` Karl Hasselström
2008-01-10  0:08         ` Karl Hasselström

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).