On Wed, Sep 14, 2016 at 1:33 PM, Evan Gates <evan.ga...@gmail.com> wrote:
> For those packages that are available through git, I think it would
> make sense to have git submodules.

After playing around with git some more, and reading more
documentation, I realize I misunderstood submodules, and subtrees are
a better fit.

For example, using sbase:

git remote add sbase git://git.suckless.org/sbase
git subtree add -P bin/sbase --squash sbase master

Now the entire sbase codebase has been checked out in bin/sbase (note
the use of --squash so we don't get the entire commit history in the
log). We can make changes, in this case probably just adding a
stali.mk as no other changes need to be made to sbase. If there are
upstream changes we can pull them in:

git pull -s substree sbase master

If there are fixes that should be pushed upstream we can push those
without pushing the rest of our work, although I think that case will
be more rare. Checkout this tutorial[0] for a more in depth
explanation.

Subtree also seems to be a good solution to use for libdrw and libutf.

It all comes down to: Is this a good use of the capabilities of git?
Or does this suck because it goes beyond most people's knowledge of
git? I think it's a good solution to the problem of pulling updates
into stali.

-emg

[0]https://medium.com/@porteneuve/mastering-git-subtrees-943d29a798ec#.jpgg69419

Reply via email to