Re: What's cooking in git/spearce.git (topics)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Theodore Tso <tytso@...>
Cc: Junio C Hamano <gitster@...>, Johannes Schindelin <Johannes.Schindelin@...>, <git@...>
Date: Tuesday, October 23, 2007 - 1:42 am

Theodore Tso <tytso@mit.edu> wrote:

There's been a couple of times in git history where Junio has basically
done this to whack next back into line:

	git checkout next
	git diff next master | git apply --index
	git commit -m "Whack next back in line"

Because we've found a change or two lurking in there that shouldn't
have been there after a while.  I think it was related to a merge
conflict that happened in next but didn't in master or something
like that.  But usually this difference exists as there's usually
always something cooking in next.
 

Yes.  But you need the prior value of the branch so you can do
something easy like:

	git checkout yourtopic
	git rebase --onto $newtopic $oldtopic

which means you probably need to look through the logs for not just
pu but also pu@{1}.  A script to break out the topic branches from
pu post fetch and store them as proper tracking branches would make
this easier, but that much.  If you plan ahead you can save that
$oldtopic point so you can do something like this:

	git log pu ; # find $newtopic
	git checkout yourtopic
	git rebase --onto $newtopic base-yourtopic
	git tag -f base-yourtopic $newtopic


It keeps the history shorter in gitk.  But otherwise it isn't bad.
Unless you are running into a lot of conflicts every time you rebase
and its wasting your time.  ;-)

I prefer to rebase the topics until they've merged to an integration
branch that doesn't rewind (e.g. master or next in git.git).
That way they have the shortest line possible in gitk between the
final merge and the start point.

There are good reasons why there's an "author" and a "committer"
field in commits.  Rebasing will change the committer field's
timestamp, but not the author field.  And author comes from the
email, to preserve the original date of development.
 

Yea, I think so too.  We've adopted this model in git.git because
it works for our community.  A lot of other communities aren't
too far away, as we have a lot of crossover in members.  E.g. we
learned a lot from the kernel community.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 16, 2:04 am)
Re: What's cooking in git/spearce.git (topics), Johannes Schindelin, (Tue Oct 16, 7:16 am)
Re: What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 16, 7:40 pm)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Tue Oct 16, 3:57 pm)
Re: What's cooking in git/spearce.git (topics), Junio C Hamano, (Mon Oct 22, 9:15 pm)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Mon Oct 22, 9:21 pm)
Re: What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 23, 12:27 am)
Re: What's cooking in git/spearce.git (topics), Junio C Hamano, (Mon Oct 22, 9:29 pm)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Mon Oct 22, 10:00 pm)
Re: What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 23, 12:05 am)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Tue Oct 23, 12:33 am)
Re: What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 23, 12:46 am)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Tue Oct 23, 12:56 am)
Re: What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 23, 1:07 am)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Tue Oct 23, 1:30 am)
Re: What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 23, 1:42 am)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Tue Oct 23, 8:03 am)
Re: What's cooking in git/spearce.git (topics), Junio C Hamano, (Tue Oct 23, 3:00 pm)
Re: What's cooking in git/spearce.git (topics), Theodore Tso, (Tue Oct 23, 8:12 pm)
Re: What's cooking in git/spearce.git (topics), Daniel Barkalow, (Tue Oct 23, 1:44 pm)
Re: What's cooking in git/spearce.git (topics), Shawn O. Pearce, (Tue Oct 16, 11:20 pm)