Zygo Blaxell wrote:You’re probably right. For many file types, st_size is likely to change (in this way your script is testing something unusual), but that is no excuse to behave poorly when it doesn’t. This leaves me nervous about speed. Consider the following simple case: someone the file to be added is already in the object repository somewhere (maybe the user has tried this code before, or a file was renamed with 'mv', or a patch applied with 'patch', or an unmount and remount dirtied the stat information). With the current code, write_sha1_file() will hash the file, notice that object is already in .git/objects, and return. With a read-hash-copy loop, git would have to store a (compressed or uncompressed) copy of the file somewhere in the meantime. But I’d be happy to see code appear that proves me wrong. ;-) One simple benchmark to try is running the git test suite. Cheers, Jonathan -- 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
| Jesse Barnes | Re: [stable] [BUG][PATCH] cpqphp: fix kernel NULL pointer dereference |
| Greg KH | [003/136] p54usb: add Zcomax XG-705A usbid |
| Magnus Damm | [PATCH 03/07] ARM: Use shared GIC entry macros on Realview |
| Oliver Neukum | Re: [Bug #13682] The webcam stopped working when upgrading from 2.6.29 to 2.6.30 |
| Martin Schwidefsky | Re: [PATCH] optimized ktime_get[_ts] for GENERIC_TIME=y |
git: | |
| Junio C Hamano | Re: Some advanced index playing |
| Jeff King | Re: confusion over the new branch and merge config |
| Robin Rosenberg | Re: cvs2svn conversion directly to git ready for experimentation |
| Linus Torvalds | git binary size... |
| Ævar Arnfjörð Bjarmason |
