From: Sanjiv Gupta <sanjiv.gupta@microchip.com>
To: Kai Blin <kai@samba.org>
Cc: Nanako Shiraishi <nanako3@lavabit.com>, git@vger.kernel.org
Subject: Re: Pulling one commit at a time.
Date: Mon, 24 Aug 2009 13:25:22 +0530 [thread overview]
Message-ID: <4A92476A.4060205@microchip.com> (raw)
In-Reply-To: <200908240946.52813.kai@samba.org>
Kai Blin wrote:
> On Monday 24 August 2009 08:22:07 Sanjiv Gupta wrote:
>
>
>>> In general the public history isn't necessarily a single straight line
>>> like this picture and it doesn't make sense to merge one at a time for
>>> all the commits on the public branch, but if that is what you really want
>>> to do, you can do so.
>>>
>> Excellent description. Thanks for that. I want to merge commits one by
>> one because I want to run a regression suite on each commit and
>> therefore know if any one is causing failures.
>>
>
> What I do for a case like this is using rebase. I'm not sure if I get the
> explanation right enough to please all the git gurus on the list, but I'll
> try. What this basically does is to back out all the commits you did on your
> branch to the point you diverged from the branch you're rebasing on now.
>
> So assuming you had a structure like this:
>
> your 'master' HEAD
> |
> A---B---C
> /
> ---X---U---V---W---Y
> |
> public 'master' HEAD
>
> git would back out commits A-C, so your local branch HEAD would be at X. Then,
> if forwards your branch to the branch you're rebasing on, so your local
> branch HEAD is at Y now, like the public branch HEAD.
>
> After that, git applies all of your patches back to your local branch,
> producing a tree that looks like this:
>
> your 'master' HEAD
> |
> A---B---C
> /
> ---X---U---V---W---Y
> |
> public 'master' head
>
> Personally I prefer that solution as it keeps the history linear. Of course
> this means that all of your commits change sha1s, and you should not do this
> on public branches with tags. But if you're still developing, it's much
> easier to wrap your head around a history like this. It's also nice to
> present feature branches to other people, as all of your commits are in one
> block, without lots of annoying merge commits between them.
>
> rebase also handles more complicated cases of merging, but from the way I
> understood your issue, this should already help.
>
> Cheers,
> Kai
>
Thanks Kai.
What I would like is to "test *every* commit" available in the public
master. There would be no local changes or commits that aren't pushed in
the private copy.
So I just want to clone one copy from the public master and then just
keep pulling commits from the public master one by one and run
regressions on each one.
It's a damn simple thing in SVN world.
$ svn info will give you the current version you are at, assume it is
"cur_rev"
$ svn update -r `expr $cur_rev + 1`
$ build
$ test
Thanks,
- Sanjiv
next prev parent reply other threads:[~2009-08-24 7:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <F536B7C316F9474E9F7091239725AC9A02FA7F44@CHN-CL-MAIL01.mchp-main.com>
2009-08-23 16:48 ` Pulling one commit at a time Sanjiv Gupta
2009-08-23 20:11 ` Alex Riesen
2009-08-23 20:17 ` Adam Brewster
2009-08-23 20:19 ` Sam Vilain
2009-08-23 21:07 ` Nanako Shiraishi
2009-08-23 22:33 ` Junio C Hamano
2009-08-24 6:22 ` Sanjiv Gupta
2009-08-24 7:46 ` Kai Blin
2009-08-24 7:55 ` Sanjiv Gupta [this message]
2009-08-24 8:20 ` Sean Estabrooks
2009-08-24 8:20 ` Erik Faye-Lund
2009-08-24 8:22 ` Erik Faye-Lund
2009-08-24 8:28 ` Matthieu Moy
2009-08-24 8:33 ` skillzero
2009-08-24 8:41 ` Matthieu Moy
2009-08-24 10:22 ` David Aguilar
2009-08-24 10:49 ` Sanjiv Gupta
2009-08-24 11:07 ` Matthieu Moy
2009-08-24 18:19 ` Avery Pennarun
2009-08-24 19:08 ` Sanjiv Gupta
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=4A92476A.4060205@microchip.com \
--to=sanjiv.gupta@microchip.com \
--cc=git@vger.kernel.org \
--cc=kai@samba.org \
--cc=nanako3@lavabit.com \
/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).