Russell Belfer
848d77dc83
Merge pull request #1242 from sba1/init-with-template-fix
...
Some fixes for external template support
2013-01-14 10:05:35 -08:00
Sebastian Bauer
72719e7333
Altered the description of the template.
...
Before, it was identical to the default template making it difficult
to check, if the proper template was copied an external template
test.
2013-01-13 12:26:52 +01:00
Sebastian Bauer
5885ba112d
Now checks in the template test whether the description file has
...
been properly copied.
This is a minimal effort to test whether the template really has
been used when creating an repo with external templates.
2013-01-13 12:26:52 +01:00
Sebastian Bauer
85f4031276
Do not use GIT_CPDIR_CHMOD flag when copying the template.
...
This is an intermin solution. While this essentially disables the
--shared flag feature, previously external templates did not work
at all. This change fixes the previously corrected, and since
then failing, repo_init__extended_with_template() test.
The problem is now documented in the source code comments.
2013-01-13 11:35:08 +01:00
Sebastian Bauer
b7b1acfdbd
Clear local error variable after invoking giterr_clear().
2013-01-12 20:02:00 +01:00
Carlos Martín Nieto
09e29e47b3
pack: fixes to the cache
...
The offset should be git_off_t, and we should check the return value
of the mutex lock function.
2013-01-12 19:41:30 +01:00
Carlos Martín Nieto
0b3aa7bede
tests: plug leaks
2013-01-12 19:01:45 +01:00
Carlos Martín Nieto
96c9b9f0e5
indexer: properly free the packfile resources
...
The indexer needs to call the packfile's free function so it takes care of
freeing the caches.
We still need to close the mwf descriptor manually so we can rename the
packfile into its final name on Windows.
2013-01-12 18:44:58 +01:00
Sebastian Bauer
4a4aee1112
Added flag GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE to test_repo_init__extended_with_template().
...
Otherwise the template functionallity is not tested (as a TODO we
also shall test that the specified template really got copied).
2013-01-12 18:44:50 +01:00
Vicent Martí
e2d2c6e57d
Merge pull request #1222 from scunz/clone_branch
...
Switch to specified branch during clone
2013-01-12 02:14:14 -08:00
Sascha Cunz
f31cae8be9
Default git_clone_options' checkout strategy to GIT_CHECKOUT_SAFE_CREATE
2013-01-12 05:51:00 +01:00
Vicent Marti
355dddbf08
buf: Is this the function you were looking for?
2013-01-12 01:40:35 +01:00
Ben Straub
3874f2d54f
Kill vestigal dangling-remote code
...
Fixes #1232
2013-01-11 20:23:46 -08:00
Philip Kelley
359316b5d3
Merge pull request #1215 from phkelley/binaryunicode
...
Add a failing test for CRLF filters
2013-01-11 17:16:55 -08:00
Philip Kelley
dd6367e37e
Fix up binaryunicode test repo
2013-01-11 20:07:52 -05:00
Sascha Cunz
f1d4a35e94
Tests: Add test for check out of given branch during clone
2013-01-12 00:08:48 +01:00
Sascha Cunz
b5b2812097
Test: Cleanup some cleaning code
2013-01-12 00:07:44 +01:00
Russell Belfer
ad10db2af8
Check for binary blobs in checkout
...
This adds a git_buf_text_is_binary check to blobs before applying
filters when the blob data is being written to disk.
2013-01-11 17:26:34 -05:00
Vicent Martí
160e4fb792
Merge pull request #1230 from arrbee/match-core-git-diff-binary-detection
...
Match binary file check of core git in diff
2013-01-11 11:35:09 -08:00
Vicent Martí
6e19edaa40
Merge pull request #1229 from arrbee/fix-diff-patch-line-numbers
...
Fix diff patch line number calculation
2013-01-11 11:34:13 -08:00
Russell Belfer
0d65acade8
Match binary file check of core git in diff
...
Core git just looks for NUL bytes in files when deciding about
is-binary inside diff (although it uses a better algorithm in
checkout, when deciding if CRLF conversion should be done).
Libgit2 was using the better algorithm in both places, but that
is causing some confusion. For now, this makes diff just look
for NUL bytes to decide if a file is binary by content in diff.
2013-01-11 11:24:26 -08:00
Russell Belfer
805c476c83
Fix diff patch line number calculation
...
This was just wrong. Added a test that verifying patch line
numbers even for hunks further into a file and then fixed the
algorithm. I needed to add a little extra state into the patch
so that I could track old and new file numbers independently,
but it should be okay.
2013-01-11 11:20:44 -08:00
Carlos Martín Nieto
80d647adc3
Revert "pack: packfile_free -> git_packfile_free and use it in the indexers"
...
This reverts commit f289f886cb
, which
makes the tests fail on Windows. Revert until we can figure out a
solution.
2013-01-11 20:17:21 +01:00
Vicent Martí
3f4437e714
Merge pull request #1227 from nulltoken/topic/emergeconflict
...
Introduce EMERGECONFLICT
2013-01-11 10:59:31 -08:00
nulltoken
f3738eba56
Fix MSVC Clar compilation warnings
2013-01-11 19:31:00 +01:00
nulltoken
090d5e1fda
Fix MSVC compilation warnings
2013-01-11 19:30:59 +01:00
nulltoken
4a0ac175ca
checkout: Deploy EMERGECONFLICT usage
2013-01-11 19:30:58 +01:00
nulltoken
635c235cf3
errors: Introduce EMERGECONFLICT error code
2013-01-11 19:30:57 +01:00
nulltoken
cce2f16b9d
Fix indentations
2013-01-11 19:30:56 +01:00
Vicent Marti
d0b14cea0e
pack: That declaration
2013-01-11 18:21:09 +01:00
Vicent Marti
6e237de6d8
regex: Proper define for this thing
2013-01-11 18:19:52 +01:00
Vicent Martí
32b33d62b2
Merge pull request #1228 from carlosmn/delta-base
...
Introduce a delta base cache
2013-01-11 09:12:21 -08:00
Vicent Martí
e87f0514ed
Merge pull request #1224 from sba1/some-regex-warning-fixes
...
Some regex warning fixes
2013-01-11 08:52:31 -08:00
Carlos Martín Nieto
f289f886cb
pack: packfile_free -> git_packfile_free and use it in the indexers
...
It turns out the indexers have been ignoring the pack's free function
and leaking data. Plug that.
2013-01-11 17:33:00 +01:00
Carlos Martín Nieto
0ed7562006
pack: limit the amount of memory the base delta cache can use
...
Currently limited to 16MB (like git) and to objects up to 1MB in
size.
2013-01-11 17:32:59 +01:00
Carlos Martín Nieto
c8f79c2bdf
pack: abstract out the cache into its own functions
2013-01-11 17:32:59 +01:00
Vicent Martí
8ace41654b
Merge pull request #1226 from nulltoken/fix/refspec_free
...
refspec: prevent git_refspec__free() from segfaulting
2013-01-11 08:26:26 -08:00
Carlos Martín Nieto
525d961c24
pack: refcount entries and add a mutex around cache access
2013-01-11 16:55:37 +01:00
Carlos Martín Nieto
c0f4a0118d
pack: introduce a delta base cache
...
Many delta bases are re-used. Cache them to avoid inflating the same
data repeatedly.
This version doesn't limit the amount of entries to store, so it can
end up using a considerable amound of memory.
2013-01-11 16:55:37 +01:00
Carlos Martín Nieto
2086e1baef
tests: plug a couple of leaks
2013-01-11 16:54:57 +01:00
nulltoken
a379e65212
refspec: prevent git_refspec__free() from segfaulting
...
Fix libgit2/libgit2sharp#247
2013-01-11 16:14:17 +01:00
Sebastian Bauer
976d9e136f
regex: Fixed warnings about unused parameter values.
...
There are different solutions to the problem. In this change, we
define an UNUSED macro that maps to __attribute__((unused)) when
compiling with gcc. Otherwise it is a NOOP. We apply this macro
in all function headers for each parameter value that is not used
within the function body.
The change is local to regex.
2013-01-11 11:03:48 +01:00
Sebastian Bauer
d2f14df8c1
regex: Fixed several warnings about signed/unsigned conversions.
2013-01-11 11:03:48 +01:00
Sascha Cunz
1265b51f5b
Add missing git_buf_free
2013-01-11 03:10:23 +01:00
Sascha Cunz
88aef76635
Implement analog for 'git checkout --branch xxx ...'
2013-01-11 03:10:19 +01:00
Sascha Cunz
132c2db6a9
Fix possible free'ing of unitialized pointer in error case
2013-01-11 02:18:27 +01:00
Vicent Martí
3a5e8faee7
Merge pull request #1221 from arrbee/checkout-without-pathspec-match
...
Add GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
2013-01-10 15:18:49 -08:00
Russell Belfer
40342bd2b6
Add GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
...
This adds an option to checkout a la the diff option to turn off
fnmatch evaluation for pathspec entries. This can be useful to
make sure your "pattern" in really interpretted as an exact file
match only.
2013-01-10 15:15:37 -08:00
Vicent Martí
404880b1ba
Merge pull request #1206 from ben/stock-auth
...
Expose stock user/pass credential utility
2013-01-10 11:24:09 -08:00
Vicent Martí
48de3061d1
Merge pull request #1220 from ethomson/reuc_empty_sides
...
REUC needs to handle empty sides
2013-01-10 10:04:53 -08:00