git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* publish from certain commit onward, keeping earlier history private, but provable
@ 2015-12-09 13:45 Jörn Hees
  2015-12-09 17:54 ` Johannes Löthberg
  2015-12-09 22:20 ` Jeff King
  0 siblings, 2 replies; 6+ messages in thread
From: Jörn Hees @ 2015-12-09 13:45 UTC (permalink / raw)
  To: git

Hi,

I've been hacking away on a library for quite some time and have a lot of commits in my private repository:

A -> B -> C -> D -> E

Finally, I'm nearing completion of a first version, and want to publish it to a remote called public from D onward keeping A..C to myself, so public should afterwards look like this:

D -> E

My main motivation is that i don't really want to put ridiculously first trials online, but still (on demand) I'd like to be able to prove how i arrived at D (think of copyright claims, etc).

As (at the moment) it's pretty much impossible to reverse-engineer the hashes of commits in the chain with times and changesets, i thought just keeping D's parent pointer to C would be one of the genius advantages of git. Sadly i can't find a way to actually make this work.

Can i somehow push D -> E to public making it a fully functional public repository with all the necessary objects included to checkout D or E and D still pointing to C as parent? If not, why is that?

What doesn't seem to work:

- push with range
  
  git push public D..E:master
  error: src refspec D..E does not match any.
  error: failed to push some refs to '<public>'

- any form of squashing / history rewriting
  
  As far as i know squashing A..D would introduce a new commit removing the parent pointer to C and thereby removing provability of the existence of A..C. (Simple example: say C reversed B, then you'd never be able to prove B was in there at some point.)
  
  I could obviously manually note the hash of C in the description of the squash commit, but there already is a parent pointer field, why not use it?
  
  Also in order to contribute further changes to public I'd have to rebase my private branches on top of this new squashed commit, which just seems as wrong...

- push from local clone with limited depth
  
  I thought i found a solution to this by first creating a local clone local_public with the desired depth before pushing that clone to public like this:
  
  git clone --depth 2 file:///<abspath_private> local_public
  
  With
  
  git log --pretty=raw
  
  I can verify that local_public only contains D -> E and that the commit, tree and parent hashes are the same, which is exactly what i want.
  
  The problem is that when i try to push to an added public remote from local_public i get an error like this:
  
  ! [remote rejected] master -> master (shallow update not allowed)


Any ideas how to make this work?

Cheers,
Jörn

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-09 22:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-09 13:45 publish from certain commit onward, keeping earlier history private, but provable Jörn Hees
2015-12-09 17:54 ` Johannes Löthberg
2015-12-09 22:20 ` Jeff King
2015-12-09 22:24   ` Jeff King
2015-12-09 22:29     ` Stefan Beller
2015-12-09 22:50       ` Jeff King

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 NNTP newsgroup(s).