Junio C Hamano <junkio@cox.net> wrote:I think we need this fix. We still have a race condition between the loose object creation and the ref update. We've closed this hole completely in the large push case (objects before the .pack file, updating refs, then deleting the .keep file; and by making sure git-repack leaves packs with .keeps alone. So we cannot lose an object here. But update-index/add/merge-recursive/write-tree/commit-tree, etc. as well as small pushes (objects <receive.unpackLimit) and fetch without -k option still have a race condition. The objects will be created/unpacked into the loose objects directory with nothing referencing them, and a prune which gets to run just before before the ref update becomes visible would probably whack those objects. Given that 'git gc' is the encouraged way to maintain a repository, and that 'repack -a -d' is safe, and prune-packed is equally safe, I think we should try to make prune safe too. Matthias' patch does this by giving the ref update process a fairly large window to perform its action within. Yes, I agree. Matthias you can take a look at builtin-reflog.c's argument handling for an example. I think you just need to use approxidate() in both your config function and in your command line argument handling. Then the default becomes '2.hours.ago' instead of just "2" (at least from a documentation perspective). Though the more I think about this perhaps the default should be '1.day'. 24 hours is a hellva large window for any current ref update to complete in, even if the ref update was some massive rsync which is doing a such a large volume of data on a small bandwidth link that it takes 20 hours to complete. Besides, users could always force it to be much lower with the command line option if they really need to prune _right_now_. -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Miller | Slow DOWN, please!!! |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Andrea Arcangeli | [PATCH 01 of 11] mmu-notifier-core |
| Andrew Morton | 2.6.23-rc3-mm1 |
git: | |
| Carl Worth | Difficulties in advertising a new branch to git newbies |
| Junio C Hamano | Re: [PATCH 3/3] Teach "git branch" about --new-workdir |
| Peter Stahlir | Git as a filesystem |
| Linus Torvalds | Re: irc usage.. |
| Wolfgang Walter | Re: Kernel oops with 2.6.26, padlock and ipsec: probably problem with fpu state ch... |
| Ingo Molnar | Re: iwlwifi: fix build bug in "iwlwifi: fix LED stall" |
| David Woodhouse | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Cedric Le Goater | Re: [PATCH net-2.6.24 0/3]: More TCP fixes |
| Richard Stallman | Real men don't attack straw men |
| Jason Dixon | Wasting our Freedom |
| bofh | Re: Code signing in OpenBSD |
| no@spam@mgedv.net | Re: HUAWEI not recognized properly (3 modem) |
| high memory | 6 hours ago | Linux kernel |
| semaphore access speed | 9 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 10 hours ago | Linux kernel |
| Easter Eggs in windows XP | 13 hours ago | Windows |
| Shared swap partition | 14 hours ago | Linux general |
| Root password | 14 hours ago | Linux general |
| Where/when DNOTIFY is used? | 16 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 18 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 19 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
