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

Re: [PATCH] Handle deltified object correctly in git-*-pull family.

From
MJMcMullan, Jason <jason.mcmullan@timesys.com>
Date
Jun 2, 2005, 17:03 UTC
Message-ID
<1117731830.32257.52.camel@jmcmullan.timesys>
In-Reply-To
<7v4qcg906f.fsf_-_@assigned-by-dhcp.cox.net>
On Thu, 2005-06-02 at 09:46 -0700, Junio C Hamano wrote:
Show 9 quoted lines
> When a remote repository is deltified, we need to get the
> objects that a deltified object we want to obtain is based upon.
> The initial parts of each retrieved SHA1 file is inflated and
> inspected to see if it is deltified, and its base object is
> asked from the remote side when it is.  Since this partial
> inflation and inspection has a small performance hit, it can
> optionally be skipped by giving -d flag to git-*-pull commands.
> This flag should be used only when the remote repository is
> known to have no deltified objects.

Eww. Don't you want to attempt to get the referenced sha1 *before* you stick the delta blob into the repository?

Otherwise, if a transfer fails, there's no good way to recover your database through the git-*pull interfaces, ie:

Try to pull session 1:
  pull tree a
    pull delta b (references blob c)
    pull blob c -> fails!
Try to pull session 2:
  pull tree a
    delta b - Found in database!
    ...
Or do I not understand your code properly?
(I'm working on a similar piece of code for my git-daemon protocol,
 which is why I'm worried about this issue)
   
-- 
Jason McMullan <jason.mcmullan@timesys.com>
TimeSys Corporation
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 20 in “diff: mode bits fixes”
  1. diff: mode bits fixesJunio C Hamano, Jun 1, 2005
  2. Handle deltified object correctly in git-*-pull family.Junio C Hamano, Jun 2, 2005
  3. Linus TorvaldsJun 2, 2005
  4. Handle deltified object correctly in git-*-pull family.Junio C Hamano, Jun 2, 2005
  5. Nicolas PitreJun 2, 2005
  6. Nicolas PitreJun 2, 2005
  7. 1/2 Handle deltified object correctly in git-*-pull family.Junio C Hamano, Jun 2, 2005
  8. Linus TorvaldsJun 2, 2005
  9. 2/2 Find size of SHA1 object without inflating everything.Junio C Hamano, Jun 2, 2005
  10. Find size of SHA1 object without inflating everything.Junio C Hamano, Jun 2, 2005
  11. Linus TorvaldsJun 2, 2005
  12. Junio C HamanoJun 2, 2005
  13. McMullan, JasonJun 2, 2005
  14. Junio C HamanoJun 2, 2005
  15. Use correct U*MAX.Junio C Hamano, Jun 2, 2005
  16. Petr BaudisJun 3, 2005
  17. Junio C HamanoJun 3, 2005
  18. Petr BaudisJun 4, 2005
  19. Junio C HamanoJun 4, 2005
  20. Find size of SHA1 object without inflating everything.Junio C Hamano, Jun 2, 2005

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.