git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-clone.txt: document that pushing from a shallow clone may work

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 4, 2009, 10:45 UTC
Message-ID
<7vvdqp5zx9.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090304101939.GA7142@chistera.yi.org>
Adeodato Simó <dato@net.com.org.es> writes:
Show 8 quoted lines
>> Wy not just say "pushing into a shallow repository is not supported"
>> instead of "pushing into a shallow repository won't work."
>
> I don't think such a wording is enough (adjusted, of course, to be about
> pushing from, not to, which is the case at hand).
>
> But I'll try to stay silent, and see if Junio has an opinion on the
> matter.

I would be a terrible judge for things like this; I lost my git virginity long time ago.

If I have to say something on this...
 * I think "is not supported" is a succinct way to give good enough
   information, but it would only work for intelligent people.
 * Not everybody is intelligent; some try it out themselves, see that the
   operation _seems to_ work for their limited number of trials, and would
   conclude it would work most of the time.  And they congratulate their
   own intelligence for saying "most of the time", not "always".  And they
   get upset when they see it does not work, even though they have been
   warned.
 * Hence, I do not think "is not supported" is a statement that is a bit
   too weak.  At least you need to say "it may seem to work, but no
   guarantees", _if_ your objective is to cover the backside of "shallow".
But I do not think that is what we should be aiming for to begin with.

It is not like nobody can precisely answer when "pushing from shallow" works and when it doesn't. It would be true for a hack that was not well designed but merely was meant to be "good enough for most of the time", but I do not think "shallow" is that horrible a hack.

Isn't the rule more or less like:
    If your shallow repository's history does not extend long enough and
    the other repository forked before your truncated history, wyou cannot
    compute the common ancestor and you cannot push out.
Previous: Adeodato SimóNext: Johannes Schindelin
Message 8 of 11 in “pushing from a shallow repo allowed?”
  1. Joey HessFeb 12, 2009
  2. Mikael MagnussonFeb 16, 2009
  3. git-clone.txt: document that pushing from a shallow clone may workAdeodato Simó, Mar 3, 2009
  4. Johannes SixtMar 3, 2009
  5. Adeodato SimóMar 3, 2009
  6. Jay SoffianMar 3, 2009
  7. Adeodato SimóMar 4, 2009
  8. Junio C HamanoMar 4, 2009
  9. Johannes SchindelinMar 4, 2009
  10. Junio C HamanoMar 5, 2009
  11. Adeodato SimóMar 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.