-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* jc/bigfile: Bigfile: teach "git add" to send a large file straight to a pack index_fd(): split into two helper functions index_fd(): turn write_object and format_check arguments into one flag
- Loading branch information
Showing
7 changed files
with
164 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
# Copyright (c) 2011, Google Inc. | ||
|
||
test_description='adding and checking out large blobs' | ||
|
||
. ./test-lib.sh | ||
|
||
test_expect_success setup ' | ||
git config core.bigfilethreshold 200k && | ||
echo X | dd of=large bs=1k seek=2000 | ||
' | ||
|
||
test_expect_success 'add a large file' ' | ||
git add large && | ||
# make sure we got a packfile and no loose objects | ||
test -f .git/objects/pack/pack-*.pack && | ||
test ! -f .git/objects/??/?????????????????????????????????????? | ||
' | ||
|
||
test_expect_success 'checkout a large file' ' | ||
large=$(git rev-parse :large) && | ||
git update-index --add --cacheinfo 100644 $large another && | ||
git checkout another && | ||
cmp large another ;# this must not be test_cmp | ||
' | ||
|
||
test_done |