On 05/31/2014 08:52 AM, Bartosz Dziewoński wrote:
I don't like this idea, for the same reasons that
other have already
given. Grafting histories with git-replace might be viable, but it'd
still be clunky and non-intuitive.
Why don't we just suggest that people use shallow clones? Git supports
pushing from and pulling to them since 1.9, and while Gerrit doesn't
accept pushes from them (or at least it didn't when I just tried), I see
no reason why Phabricator would have any issues if it only works on
diffs anyway, not commits.
Are you sure you can push from a shallow clone to a normal git repo?
The 1.9 release notes
(
https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/1.9…)
just say:
" * Fetching from a shallowly-cloned repository used to be forbidden,
primarily because the codepaths involved were not carefully vetted
and we did not bother supporting such usage. This release attempts
to allow object transfer out of a shallowly-cloned repository in a
more controlled way (i.e. the receiver becomes a shallow repository
with a truncated history)."
Note the part about the receiver also being shallow.
I agree Phabricator should work fine. Heck, you can push to Phabricator
via copy-and-paste (
http://fab.wmflabs.org/differential/diff/create/),
so there's no reason "push from shallow clone" can't be implemented.
Matt