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

Re: [PATCH 2/3] git-bundle: die if a given ref is not included in bundle

From
Junio C Hamano <junkio@cox.net>
Date
Mar 9, 2007, 07:17 UTC
Message-ID
<7vejny7umx.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<45F0D1B3.9020204@gmail.com>
Mark Levedahl <mlevedahl@gmail.com> writes:
> ... Without, I
> can just do git bundle ... <list of refs> and those which have been
> updated get included.

I am not sure if the above is true. How are you preventing the command from bundling everything? You must have some limiter at the bottom, something like --since=25.hours (to account for cron schedule skew), not just <list of refs>.

I do not think the max-age limiter works as you are expecting, especially when merges and clock skew among committing machines are involved (just as you are distributing from central repo, I am assuming you are getting work back from worker-bee machines to the central repo at some point, and doing sneakernet implies to me that they are disconnected machines, not running ntp, but this is just me guessing).

In any case, the semantics of --since=25.hours limiter is not "show everything newer than 25.hours that are reachable from any of these refs"; it is "start digging from these tips, and stop exploring the path as soon as you hit something that is newer than 25.hours".

It appears that for the past few days we have been spending significant effort to make --max-count and --max-age work with bundles, but my honest impression is they do not play well in the real world, especially when clock skew is involved. On the other hand, revision ranges ("include these, exclude those") are always precise, and that is what you would want to be using, especially from an automated script.

If I were doing a nightly script, I would probably be doing something like this:

	#!/bin/sh
	yesterday=$(git bundle list-heads yesterday.bdl | sed -e 's/ .*//')
	git bundle create today.bdl --all --not $yesterday
	# mail it out

After sending today's bundle out, you will rotate it out to yesterday.bdl in order to prepare for the next round. It is likely that you would want to keep a few day's worth of bundles for other reasons _anyway_ (say, some project members might be out of office, or mail gets dropped, or whatever), I think the above is a reasonably clean and easy thing to arrange.

Previous: Mark LevedahlNext: Mark Levedahl
Message 3 of 21 in “git-bundle: die if a given ref is not included in bundle”
  1. 2/3 git-bundle: die if a given ref is not included in bundleJohannes Schindelin, Mar 9, 2007
  2. Mark LevedahlMar 9, 2007
  3. Junio C HamanoMar 9, 2007
  4. Mark LevedahlMar 9, 2007
  5. Mark LevedahlMar 9, 2007
  6. git-bundle: only die if pack would be empty, warn if ref is skippedJohannes Schindelin, Mar 9, 2007
  7. Mark LevedahlMar 10, 2007
  8. Junio C HamanoMar 9, 2007
  9. Mark LevedahlMar 10, 2007
  10. Johannes SchindelinMar 10, 2007
  11. Mark LevedahlMar 10, 2007
  12. Johannes SchindelinMar 10, 2007
  13. Mark LevedahlMar 10, 2007
  14. Johannes SchindelinMar 11, 2007
  15. Junio C HamanoMar 11, 2007
  16. Johannes SchindelinMar 11, 2007
  17. Mark LevedahlMar 11, 2007
  18. Junio C HamanoMar 11, 2007
  19. Johannes SchindelinMar 11, 2007
  20. Mark LevedahlMar 13, 2007
  21. git-bundle: die if the bundle is empty.Mark Levedahl, Mar 9, 2007

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.