Junio C Hamano wrote:
Mark Levedahl <mlevedahl@xxxxxxxxx> writes:
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>.
Sorry, I trimmed too much. My typical command usage is something like
git bundle create foo --since=10.days.ago --all
I include a very generous date range so that folks don't have to update
daily, can cover a vacation with a single bundle, etc. I think this
usage renders moot all practical issues with clock skew. I am being
loose, if the bundle won't apply then get one from the previous week,
apply, and go forward.
BTW, shouldn't git check for clock skew when creating a commit to assure
the parents predate the child? Clock skew could allow this circumstance
which would look suspicious when exploring a history.
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".
I presume you mean "older than 2.5" hours in the above.
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.
This is certainly a reliable method, but has the difficulty of how to
get started and of course requires that history be kept for the entire
range covered by each bundle. The first bundle is either a) the entire
repository, or b) crafted by trying each and every ref to find which are
legal to define. While all of this can be done, I think this cure is
worse than the disease (seconds to minutes of clock skew).
I would prefer to just add a warning to the manual that when limiting by
date, be generous to allow for all possible clock skew across the
distributed set of computers.
Mark
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html