From: Jeff Hostetler <git@jeffhostetler.com>
To: "Randall S. Becker" <rsbecker@nexbridge.com>, git@vger.kernel.org
Subject: Re: [RFE] Inverted sparseness
Date: Fri, 1 Dec 2017 13:19:01 -0500 [thread overview]
Message-ID: <bdd01692-198a-f5ec-3c88-7d99e4adced5@jeffhostetler.com> (raw)
In-Reply-To: <004201d36ac8$db62b900$92282b00$@nexbridge.com>
On 12/1/2017 12:21 PM, Randall S. Becker wrote:
> I recently encountered a really strange use-case relating to sparse clone/fetch that is really backwards from the discussion that has been going on, and well, I'm a bit embarrassed to bring it up, but I have no good solution including building a separate data store that will end up inconsistent with repositories (a bad solution). The use-case is as follows:
>
> Given a backbone of multiple git repositories spread across an organization with a server farm and upstream vendors.
> The vendor delivers code by having the client perform git pull into a specific branch.
> The customer may take the code as is or merge in customizations.
> The vendor wants to know exactly what commit of theirs is installed on each server, in near real time.
> The customer is willing to push the commit-ish to the vendor's upstream repo but does not want, by default, to share the actual commit contents for security reasons.
> Realistically, the vendor needs to know that their own commit id was put somewhere (process exists to track this, so not part of the use-case) and whether there is a subsequent commit contributed by the customer, but the content is not relevant initially.
>
> After some time, the vendor may request the commit contents from the customer in order to satisfy support requirements - a.k.a. a defect was found but has to be resolved.
> The customer would then perform a deeper push that looks a lot like a "slightly" symmetrical operation of a deep fetch following a prior sparse fetch to supply the vendor with the specific commit(s).
>
> This is not hard to realize if the sparse commit is HEAD on a branch, but if its inside a tree, well, I don't even know where to start. To self-deprecate, this is likely a bad idea, but it has come up a few times.
>
> Thoughts? Nasty Remarks?
>
> Randall
Perhaps I'm not understanding the subtleties of what you're describing,
but could you do this with stock git functionality.
Let the vendor publish a "well known branch" for the client.
Let the client pull that and build.
Let the client create a branch set to the same commit that they fetched.
Let the client push that branch as a client-specific branch to
the vendor to indicate that that is the official release they
are based on.
Then the vendor would know the official commit that the client was
using.
If the client makes local changes, does the vendor really need the
SHA of those -- without the actual content? I mean any SHA would
do right? Perhaps let the client create a second client-specific
branch (set to the same commit as the first) to indicate they had
mods.
Later, when the vendor needs the actual client changes, the client
does a normal push to this 2nd client-specific branch at the vendor.
This would send everything that the client has done to the code
since the official release.
I'm not sure what you mean about "it is inside a tree".
Hope this helps,
Jeff
next prev parent reply other threads:[~2017-12-01 18:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 17:21 [RFE] Inverted sparseness Randall S. Becker
2017-12-01 18:19 ` Jeff Hostetler [this message]
2017-12-01 18:31 ` Randall S. Becker
2017-12-03 23:14 ` Philip Oakley
2017-12-03 23:44 ` Randall S. Becker
2017-12-04 11:54 ` Philip Oakley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdd01692-198a-f5ec-3c88-7d99e4adced5@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).