[pkg-fso-maint] special git layout - how to package

Heiko Stübner heiko at sntech.de
Tue Apr 28 07:35:39 UTC 2009


Hi,

it seems I will need a bit more assistance, as somewhere it went wrong. I did 
the following:

# git ls-tree -d HEAD
040000 tree 0c9aa01b1bc1d089331c8686352b10f530556e50    docs
040000 tree 2165fe7795bb83781cb7636a8aa5e5ba9270ce8c    fsodeviced
040000 tree 7bfe3b51fd7ab48d9cdf4f6e7f9d7a46c21eef6c    fsogsmd
040000 tree 8587df780829d98f75d1e6e2faa579012c73841e    libfsoframework
040000 tree 13c2d8e9d2f99974c914189308921515c86b82a6    libfsotransport

according to [1] to create an empty branch
#git symbolic-ref HEAD refs/heads/libfsotransport
#rm .git/index 
#git clean -fdx

#echo "import libfsotransport" | git commit-tree \
13c2d8e9d2f99974c914189308921515c86b82a6
Result: efdb84b74e983be9e0cab7aeb9f732c67e1b0c02

#git checkout efdb84b74e983be9e0cab7aeb9f732c67e1b0c02warning: You appear to 
be on a branch yet to be born.
warning: Forcing checkout of efdb84b74e983be9e0cab7aeb9f732c67e1b0c02.
Note: moving to "efdb84b74e983be9e0cab7aeb9f732c67e1b0c02" which isn't a local 
branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at efdb84b... import libfsotransport

libfso-transport is there, but its revision-history (and me too) seems to be 
lost.


So any additional pointer would be happily accepted :-)

Thanks
Heiko

[1] http://github.com/jwiegley/git-scripts/blob/master/git-empty-branch

Am Dienstag 28 April 2009 schrieb Joachim Breitner:
> Hi,
>
> Am Dienstag, den 28.04.2009, 00:05 +0200 schrieb Heiko Stuebner:
> > the cornucopia-git seems to consists of subdirs representing individual
> > subprojects, e.g. libfsotransport.
> >
> > libfsotransport is now needed for libgsm0710mux and therefore for
> > fso-abyss.
> >
> > Do strategies exists how such a setup could be handled with
> > git-buildpackage, or is it necessary to split libfsotransport off of its
> > git and use a new repo?
> >
> > On Sunday Mickey changed the abyss-parts to support newer vala versions -
> > 0.7.1 to be precise and this version was uploaded by the debian-vala-
> > maintainers monday too - what coincidence :-).
>
> I have faced the same issue with SHR. Here is what I did (quoting a mail
> from 22. Nov 2008):
>
> =======================
> Hi again,
>
> just some newly-won git insights that I want to share:
>
> Am Samstag, den 22.11.2008, 02:21 +0100 schrieb Joachim Breitner:
> > The branch “upstream” is actually the subdirectory
> > libframeworkd-phonegui/ of their “all-in-one“ directory – I extracted
>
> it
>
> > in a pretty crude way, not sure if git will handle that nicely when
> > merging[1].
>
> It seems it did the trick: The new commit points to exactly the same
> tree as the directory in the old commit:
>
> $ git-show --pretty=raw 70df8b0b19e1595f299f1d510bc8789abfb2a8dd
> commit 70df8b0b19e1595f299f1d510bc8789abfb2a8dd
> tree 9b7996f659712bb6309c2a7f97cc4f554051bf59
> parent bebb79069c8a0813e83d026a4043c240b16af7ae
> author Joachim Breitner <mail at joachim-breitner.de> 1227314315 +0100
> committer Joachim Breitner <mail at joachim-breitner.de> 1227314315 +0100
>
>     Extract libframeworkd-phonegui
> [..]
> $ git-ls-tree 6497719cb197071c407067739fc232b0e8d98781
> 100644 blob 203e93a9a18372bad0ece00571e914cc2b209b5f    README
> 040000 tree
> d7f02e094f89c4f9c4591ada119dbe9414c0c4b9    libframeworkd-phonegui-efl
> 040000 tree
> 3f7acdbd7e7c2f3c7053ed4fa389e4ab88da4f59    libframeworkd-phonegui-gtk
> 040000 tree
> 9b7996f659712bb6309c2a7f97cc4f554051bf59    libframeworkd-phonegui
> [..]
>
> (compare the last line and the tree line above)
>
> This is actually identical to manually constructing a commit with
> git-commit-tree (which is actually what you’d expect from git’s
> semantics, but it’s surprising that it works).
>
> Merging is also no problem if you always pass "-s subtree" to git-merge
> – then it’s notice the common tree ids and merge accordingly.
> =======================
>
> So what you do is you find out the tree id fo the subproject with
> git-ls-tree and create a new commit (probably in an empty branch
> „libfsotransport“, google for how to create a new empty branch) using
> git-commit-tree.
>
> If you need more detailed instructions, just ask.
>
> Greetings,
> Joachim





More information about the pkg-fso-maint mailing list