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

Re: Clone from shallow bundle bug

From
PSPhillip Susi <psusi@ubuntu.com>
Date
Apr 1, 2015, 13:00 UTC
Message-ID
<551BEC08.7080906@ubuntu.com>
In-Reply-To
<CACsJy8AiOsSJ7QsOmpy5Ss_fKaDK1G4ONgi=jDqM_+Vrv++pkA@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 4/1/2015 6:01 AM, Duy Nguyen wrote:
Show 19 quoted lines
> On Wed, Apr 1, 2015 at 1:31 PM, Junio C Hamano <gitster@pobox.com>
> wrote:
>> The only way a bundle can record "something" "noting" that it is
>> an incomplete history, while allowing it to be read by existing 
>> implementations of "git bundle unbundle" is to list the commits, 
>> behind which there is no history available in the bundle, as 
>> bundle's pre-requisites.  I said that the addition of shallow
>> repository support did not enhance "git bundle create" to do so,
>> and you are saying "it just needs to put", implying that it
>> currently does not.
> 
> Alternatively, we can record SHA-1 in the shallow file as refs
> whose name is always ".shallow". This way "unbundle" can recreate
> the shallow file if it wants. Having this "remote" shallow file
> would fit well in our fetch pipeline. It's harder to recreate
> shallow file if we record prerequisite instead: if commit A is in
> the shallow file, the ones in prerequisite category would be A's
> parents. So we would need to go over the bundle to look for commits
> whose parents are all in prerequisite list. It takes more time.

Right; you can't rely only on the pre-requisets as objects in the bundle may be deltaed against them and so they can not be unpacked without them. The idea here is that all required objects ( and their delta bases ) are present, either in the bundle, or in the local repository, but if you walk the history chain you arrive at a parent pointer to an object you don't have. That point should automatically be recorded in .git/shallow.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJVG+wIAAoJENRVrw2cjl5Rj2UH/0AXyy63MDYhg0C7t4ljsb0U pHo5vZyfurO2k4vd2kiUySDhIaZ7gmhkPySbPlphzqHGtvdPtyLwkYPVgqBVv7uA fDodTsxt64MbdFN3CNk5zh5BLDs6q1+1IjscvTlsmjCQbTz+ys+Qw1QS0zS9hSWD +jGDCa1x5zETniI0wJiXSSiCF6ZtFHuEJwZp5MSj257tAidibi/a0U+AHYdFwgSf jtoUWXR2t9Xl/eN1Xkw3bjE5xQUogZYox0IuUWPvv4c4rmgxhU6SYzYftWD7Lkof vL2t+y1x1IhmgLaIoPz+/p/Dfeupivf6F8dS6cfyG++QIshPGq6ACZ49NRymcy0= =TctP -----END PGP SIGNATURE-----

Previous: Duy NguyenNext: Junio C Hamano
Message 6 of 16 in “Clone from shallow bundle bug”
  1. Phillip SusiMar 31, 2015
  2. Junio C HamanoMar 31, 2015
  3. Phillip SusiApr 1, 2015
  4. Junio C HamanoApr 1, 2015
  5. Duy NguyenApr 1, 2015
  6. Phillip SusiApr 1, 2015
  7. Junio C HamanoApr 1, 2015
  8. Duy NguyenApr 2, 2015
  9. Duy NguyenApr 2, 2015
  10. Phillip SusiApr 2, 2015
  11. Duy NguyenApr 1, 2015
  12. Phillip SusiApr 1, 2015
  13. Duy NguyenApr 1, 2015
  14. Phillip SusiApr 1, 2015
  15. Duy NguyenApr 1, 2015
  16. Phillip SusiApr 1, 2015

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.