Hi Sean,

Thanks a lot for working on this!

On Fri, Mar 04, 2011 at 07:10:31PM +0100, Sean Finney wrote:
> (re-sending because the bts was eating mail this morning, it seems)
> 
> 
> Hi everyone,
> 
> Okay, I think I have a working version that no longer uses stash.
> Basically it does what I talked about a message or two ago (recursive
> ls-tree + git archive with cwd set to submodule directory).
> 
> http://git.debian.org/?p=users/seanius/git-buildpackage.git;a=shortlog;h=refs/heads/submodules-support-20110302-1
> 
> This should work irrespective of any local changes in the working
> directory, different submodule versions, or committed changes in the
> debian branch.  
> 
> The only requirement is that the submodules in the current tree must be
> a superset of the submodules in the upstream tree, as i could not find
> any way to get git-archive to work for a submodule without being in the
> submodule directory (and thus having access to the .git dir).  At some
> later point in time, if this were something someone started complaining
> about, it could be fixed by creating a secondary, maybe partial, clone
> to get the submodule, or looking up the submodule's information and
> cloning it directly into a temporary directory.
> 
> I haven't thoroughly tested dump_tree, but I have examined the output
> tarfile against a manually created baseline, and the only difference in
> the gbp-generated tarfile is a few duplicate directories resulting from
> the tarfile concatenation (not an issue afaik).
> 
> There's probably room for some configurable items in the implementation,
> but I think I might need to use it for a bit before figuring out what
> would actually be useful to have and what wouldn't.
> 
> As a final note: you might notice that the commit history is a touch
> long... if you'd rather have a much smaller set of of commits to review
> I could probably squish/amend things together.  If you want to pull from
> this I can rebase it one final time onto your master repo, and otherwise
> if you want me to format-patch it and mail it i can do that as well.

The archive with all the patches is fine. I'm looking at the full diff
and at the individual commits at the moment. It looks great overall but
I think we should fix some minor issues:

* I think we can avoid introducing Command.popen by adding ls_tree to the Git
  class itself which already has a __git_getoutput class to read the output of
  git commands.

* It might make sense to turn GitArchive int Git.archive(format,
  prefix, output, treeish) for readability again extending the Git
  class.

* dump_tree creates a new repo = GitRepository() it might be better to
  pass in the existing one.

> Lemme know what you think!
Can you have a look? Otherwise I'll try to find the time to make the
changes.
Cheers,
 -- Guido



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to