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

Grafts workflow for a "shallow" repository...?

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Sep 16, 2008, 05:09 UTC
Message-ID
<46a038f90809152209l2230d9e3o442dac1f5047d2bd@mail.gmail.com>

Here is my attempt at a "let's publish a shallow repository for branch of moodle". Let me show you what I did...

 # before we start
 git --version
 git version 1.5.5.1
 cat /etc/redhat-release
 Fedora release 9 (Sulphur)
 # clone the 'full' repo ~200MB fully packed
 git clone git://git.catalyst.net.nz/moodle-r2.git
 # 1.7 was a significant release, anything earlier than that
 # is just not interesting -- even for pickaxe/annotate purposes
 # so add a graft point right at the branching point.
 cd moodle-r2
 echo `git merge-base origin/cvshead origin/MOODLE_17_STABLE` >>
.git/info/grafts
 # push the branches I care about to a newly created repo on a different server
 # this is approx 50MB... (as opposed to 200MB)
 git push git+ssh://dev.laptop.org/home/martin/public_git/moodle.git \
    origin/MOODLE_19_STABLE:refs/heads/MOODLE_19_STABLE
 git push git+ssh://dev.laptop.org/home/martin/public_git/moodle.git \
    origin/cvshead:refs/heads/cvshead
 # fixed up the server-side repo to have HEAD pointing to a new branch...
 # clone to see it works...
 git clone  git://dev.laptop.org/git/users/martin/moodle.git
 # and now gitk bails out on me. Not entirely unexpected...
 gitk --all

Is this kind of workflow (or a variation of it) supported? For this to work, we should communicate the grafts in some push operations and read them in clone ops - and perhaps in fetch too.

cheers,
martin
-- 
 martin.langhoff@gmail.com
 martin@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
Next: Shawn O. Pearce
Message 1 of 9 in “Grafts workflow for a "shallow" repository...?”
  1. Martin LanghoffSep 16, 2008
  2. Shawn O. PearceSep 16, 2008
  3. Junio C HamanoSep 16, 2008
  4. Björn SteinbrinkSep 16, 2008
  5. Michael J GruberSep 16, 2008
  6. Björn SteinbrinkSep 16, 2008
  7. Sverre RabbelierSep 16, 2008
  8. Dmitry PotapovSep 16, 2008
  9. SergioSep 16, 2008

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.