{"thread":{"id":"6355","subject":"Re: Importing from tarballs; add, rm, update-index?","startedAt":"2007-01-12T15:39:37Z","lastAt":"2007-01-12T15:39:37Z","messageCount":1,"participants":["Horst H. von Brand"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"31560","messageId":"200701121539.l0CFdbR4017026@laptop13.inf.utfsm.cl","threadId":"6355","inReplyTo":"J.Sixt@eudaptics.com","subject":"Re: Importing from tarballs; add, rm, update-index?","fromName":"Horst H. von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2007-01-12T15:39:37Z","receivedAt":"2007-01-12T15:39:37Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Johannes Sixt <J.Sixt@eudaptics.com> wrote:\n> \"Horst H. von Brand\" wrote:\n> > Hum... something like the following (completely untested!) should do the\n> > trick:\n> > \n> >   cd /basedir\n> >   mkdir codebase; cd codebase; git init-db\n> >   for version in 1.0 1.1 1.1a 1.1b 2.0.0 ...; do\n> >      cd /basedir\n> >      tar xf tarball-$version.tar\n> >      mv codebase-$version/* codebase    # Take care to move everything!\n> >      cd codebase\n> >      git add .\n> >      git commit -a -m \"Updated to $version\"\n> >      rm -rf *                  # Delete everything except for git stuff\n> >   done\n> \n> You can let GIT_DIR point somewhere outside the extracted directory.\n\nOK! Then it would be:\n\n   cd /basedir\n   mkdir codebase/.git; cd codebase; git init-db\n   for version in 1.0 1.1 1.1a 1.1b 2.0.0 ...; do\n      cd /basedir\n      tar xf tarball-$version.tar\n      cd codebase-$version\n      git --git-dir=/basedir/codebase/.git add .\n      git --git-dir=/basedir/codebase/.git \\\n          commit -a -m \"Updated to $version\"    # Spice up to taste\n   done\n\nAnd the \"add\" looks strangely misplaced... but it /does/ its job.\n\n> If the dates of your tarballs are meaningful, you can use something like\n> this:\n> \n> export GIT_AUTHOR_DATE=\"$(date --reference=foo-1.1.tar +%s) -07:00\"\n\nBetter use it to make up a commit message. Could use inline docs for this.\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                    Fono: +56 32 2654431\nUniversidad Tecnica Federico Santa Maria             +56 32 2654239\nCasilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513\n"}]}