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

Re: Importing from tarballs; add, rm, update-index?

From
Johannes Sixt <j.sixt@eudaptics.com>
Date
Jan 12, 2007, 14:39 UTC
Message-ID
<45A79DBC.1795F5C4@eudaptics.com>
In-Reply-To
<200701121409.l0CE9923015123@laptop13.inf.utfsm.cl>
"Horst H. von Brand" wrote:
Show 14 quoted lines
> Hum... something like the following (completely untested!) should do the
> trick:
> 
>   cd /basedir
>   mkdir codebase; cd codebase; git init-db
>   for version in 1.0 1.1 1.1a 1.1b 2.0.0 ...; do
>      cd /basedir
>      tar xf tarball-$version.tar
>      mv codebase-$version/* codebase    # Take care to move everything!
>      cd codebase
>      git add .
>      git commit -a -m "Updated to $version"
>      rm -rf *                  # Delete everything except for git stuff
>   done
You can let GIT_DIR point somewhere outside the extracted directory.

If the dates of your tarballs are meaningful, you can use something like this:

export GIT_AUTHOR_DATE="$(date --reference=foo-1.1.tar +%s) -07:00"
   
-- Hannes
Previous: Horst H. von Brand
Message 2 of 2 in “Re: Importing from tarballs; add, rm, update-index?”
  1. Horst H. von BrandJan 12, 2007
  2. Johannes SixtJan 12, 2007

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.