Thread (35 messages) flat view 35 messages, 14 authors, 2016-06-15

Re: Merging commits together into a super-commit

From: Yann Dirson <hidden>
Date: 2016-06-15 22:43:09

On Thu, May 10, 2007 at 12:48:05PM -0700, Carl Worth wrote:
On Thu, 10 May 2007 21:21:06 +0200, Petr Baudis wrote:
quoted
I think you are underestimating stg here.
Yes, maybe I didn't learn to use it well enough.
quoted
You can stg init just once per branch (ever), I think.
I don't have details now, but I know I ran into some difficulty when
leaving the extra stg state around.
I really think we should have a "stg uninit" command.  Note that
currently "stg branch --delete" on master will just do that instead of
really deleting the branch, but that is a known bug (#8732 on gna).
It seems that it added stuff that
resulted in some reference of mine becoming ambiguous, ("refspec <foo>
matches more than one" perhaps?). What I do remember is that I couldn't
get one of my standard git push commands to work until I deleted all
of .git/refs/bases and .git/refs/patches and then things started to
work again.
I remember quite some time ago that cg-push exhibited this behaviour.
However, nowadays I frequently push stgit stacks with git-push without
a problem.
quoted
	stg uncommit -n N
	stg pop -n N-1
	..hack..
	stg refresh
	stg push -a

It seems to be a bit shorter than the sequence you've presented above,
and overally working with volatile commits using StGIT feels much more
natural to me - and I haven't even ever used quilt seriously! (I have
special antipathy to the git reset UI, too.)
The -n option is something I hadn't noticed, and that helps, (except
that what I've got to start with is a git revision name, not a
number).
While "uncommit to named commit" that Karl implemented helps here, and
that "stg goto <patchname>" may be a viable alternative to "pop -n",
you may also want to try:

	stg uncommit -t <commit>
	..hack..
	stg refresh -p <patchname>

There are still some rough edges with "refresh -p", though[*], but
when it works I love this comfort :)

Best regards,
-- 
Yann.

[*] most notably, it does not work yet if any patch above the one you
want to modify changes the same file)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help