git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Oberndorfer <kumbayo84@arcor.de>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: [STGIT] stg refresh wish (splitting patches/removing files from a patch)
Date: Sun, 30 Dec 2007 20:03:33 +0100	[thread overview]
Message-ID: <200712302003.33478.kumbayo84@arcor.de> (raw)

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

             reply	other threads:[~2007-12-30 19:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-30 19:03 Peter Oberndorfer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200712302003.33478.kumbayo84@arcor.de \
    --to=kumbayo84@arcor.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).