git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Pulling one commit at a time.

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Aug 24, 2009, 08:41 UTC
Message-ID
<vpqfxbhd2o4.fsf@bauges.imag.fr>
In-Reply-To
<2729632a0908240133t12eaafd5oe8d50af6d6eec566@mail.gmail.com>
skillzero@gmail.com writes:
Show 21 quoted lines
> On Mon, Aug 24, 2009 at 12:55 AM, Sanjiv
> Gupta<sanjiv.gupta@microchip.com> wrote:
>
>> 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
>
> I'm not sure if this is the best way, but you can use git fetch to get
> the latest stuff from the server without merging it then you can merge
> from origin/master (i.e. the server) into your local master, one
> commit at a time, and verify at each step:

See my other reply, but I really don't think you want to _merge_ one commit at a time. This would not mean "test each commit" but "test the interaction between any two commits", which few people would care about.

The example above in SVN doesn't merge each commit, it just walks history (assuming the history is linear, the example wouldn't be as simple if it had to walk /branches/* too). To continue the analogy, merging commits one by one in Git would be more or less the equivalent in SVN of:

$ svn status
# Hmm, OK, I have stuff to commit.
$ test
# Yes, it works. But do my changes work too on top of the previous
# commits?
$ while ...; do
    svn update $(($cur_rev - 1))
    build
    test
  done
# If so, then
$ svn update
$ svn commit

That is: test the interaction between your new change with any other changes in the repository. 'never seen anyone interested by such thing, but why not ;-).

-- 
Matthieu
Previous: skillzero@gmail.comNext: David Aguilar
Message 15 of 20 in “Pulling one commit at a time.”
  1. Sanjiv GuptaAug 23, 2009
  2. Alex RiesenAug 23, 2009
  3. Adam BrewsterAug 23, 2009
  4. Sam VilainAug 23, 2009
  5. Nanako ShiraishiAug 23, 2009
  6. Junio C HamanoAug 23, 2009
  7. Sanjiv GuptaAug 24, 2009
  8. Kai BlinAug 24, 2009
  9. Sanjiv GuptaAug 24, 2009
  10. Sean EstabrooksAug 24, 2009
  11. Erik Faye-LundAug 24, 2009
  12. Erik Faye-LundAug 24, 2009
  13. Matthieu MoyAug 24, 2009
  14. skillzero@gmail.comAug 24, 2009
  15. Matthieu MoyAug 24, 2009
  16. David AguilarAug 24, 2009
  17. Sanjiv GuptaAug 24, 2009
  18. Matthieu MoyAug 24, 2009
  19. Avery PennarunAug 24, 2009
  20. Sanjiv GuptaAug 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.