Hi Roger,
thanks a lot for the explantion! The plan is to do it quiet similar to
what you describe but using git-fast-import instead.

On Sat, Aug 15, 2009 at 02:08:09PM +0100, Roger Leigh wrote:
[..snip..] 
> As an example, take what's currently done to import an orig source
> (approximately)
> 
> - check if working tree is dirty
> - switch to orig branch
> - unpack source
> - remove and add files to make the working tree match the branch
> - commit
> - checkout master branch
> - merge
Have a look at git-import-orig --fast-import. This is how
git-import-orig handles this (quiet similar to what you describe below)
and how git-import-dsc(s) will handle all this in the future. You can
give the ancestors via "from" and "ancestor". This is very similar to
how git-commit-tree works except that you don't even need a temporary
index.

> 
> I've seen random bits in the tree get comitted using git-import-*
> e.g. if in .gitignore or otherwise not noticed.
> There's a far far simpler way:
> 
> - unpack source
> - add sources into an alternate index
> - git write-tree to write index into repo
> - git commit-tree to commit
> - git update-ref to update the orig branch
This (in a way) is similar to what git-buildpackage --export=WC does BTW
(using a temporary index to write out a tree).

See above. Using git-fast-import has the advantage that we don't even
need to unpack the source explicitly. We can feed it right from tar.
It's just that I didn't get around to do it for git-import-dscs(s) as
well. (https://honk.sigxcpu.org/piki/projects/git-buildpackage/) has
this as TODO item (more git-fast-import support).
Cheers,
 -- Guido



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to