On 01/29/14 00:16, Eric Reischer wrote:
I have a fairly esoteric situation, but I suspect I'm probably not the
only one who is attempting to do something along these lines.  I have a
software product that consists of a number of Git repositories, each
with its own group of engineers working on it (think of MATLAB (R) with
its plethora of toolboxes).  When we deliver software to customers, we
ideally would have a superproject that references each repo such that we
can just have bare repositories that are delivered (i.e. zip up the
superproject after removing all source code), and then on-site the
customer runs a program that performs a "reset --hard" to get all the
source code back.  Easy enough.  (Before everyone asks, it's because the
source code occupies several hundred megabytes, so having everything
compressed in the repo is convenient for keeping the media count low.)

The rub comes in that we do not want our customers to see all of our
development history (and our sometimes not-so-professional commit
remarks).  I've read about a shallow clone (i.e. --depth 1), but it is
my understanding these types of repos cannot be used with git-bundle.
It does seem to follow everything else though, in that updates that
occur upstream (i.e. bugfixes to a major revision) will be successfully
applied with a pull or fetch.  The other issue is the --depth flag
doesn't seem to be supported with the submodule command.

Anyone have any thoughts on how to accomplish all this?

We did something similar using ClearCase a long time ago. I would
separate the development repos from the customer repos. The customer
repos would contain snapshots from the development repos, with
one patch per release. You would basically be squashing
the history to one commit per release for the customers.

I would write a release script along these lines:

# Assuming dev repos have the same tag for each release

for r in <dev repos>; do
  cd $r
  git diff -p $from_tag $to_tag > /tmp/$r-$to_tag.patch
  cd $r_customer         # Go to corresponding customer repo
  patch -p0 < /tmp/$r-$to_tag.patch
  git add .
  git commit -m "Release notes ..."
  git tag ...
cd $customer_super_repo
git add .
git commit -m "Release notes ..."
git tag ...

# Continue with packing super-repo to customer...


You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to