Thread (29 messages) flat view 29 messages, 9 authors, 2016-06-15

Re: [ANNOUNCE] pg - A patch porcelain for GIT

From: Karl Hasselström <hidden>
Date: 2016-06-15 22:42:19

Possibly related (same subject, not in this thread)

On 2006-02-15 11:42:55 +0100, Andreas Ericsson wrote:
Karl Hasselström wrote:
quoted
You can actually do this today; just create a new branch where you
want your new stgit stack to be based, and "stg pick" the
commits/patches from the old branch:

  $ git-checkout -b new-branch HEAD^^^
  $ stg init
  $ stg pick old-branch^^^ -n create-foo
  $ stg pick old-branch^^ -n improve-foo
  $ stg pick old-branch^ -n improve-bar
  $ git-branch -D old-branch
  $ git-checkout -b old-branch
  $ git-branch -d new-branch

This series of commands also converts the top three commits to
stgit patches, and leaves the user on the same branch where she
started (it does _exactly_ the same job as "stg uncommit
improve-bar improve-foo create-foo"), but it's a lot of work, and
a typo could lose commits.
Isn't this akin to what "git cherry-pick" does, except for the
"convert to stgit patches" thing?
Yes, "stg pick" and git-cherry-pick are very similar as far as I know,
the only difference being that "stg pick" creates an stgit patch while
git-cherry-pick creates a regular commit. (And an applied stgit patch
is just a regular commit which stgit maintains some metadata about.)

However, using git-cherry-pick in this scenario would just recreate
the initial state exactly, since converting the commits to stgit
patches was what it was all about.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help