Commit Graph

4004 Commits

Author SHA1 Message Date
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
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
Edward Thomson
eb3c247a78 REUC needs to handle empty sides 2013-01-10 11:56:02 -06:00
Vicent Martí
7bacc2c8c5 Merge pull request #1182 from libgit2/odb-file-refresh
Sane refresh logic for #1180
2013-01-10 08:15:10 -08:00
Vicent Martí
3f31ce8d95 Merge pull request #1218 from sba1/amiga.2
Libgit2 for AmigaOS4
2013-01-10 08:13:02 -08:00
Vicent Marti
8fe6bc5c47 odb: Refresh on exists query too 2013-01-10 15:43:08 +01:00
Vicent Marti
891a4681eb dat errorcode 2013-01-10 15:34:56 +01:00
Vicent Marti
4a863c0666 Sane refresh logic
All the ODB backends have a specific refresh interface. When reading an
object, first we attempt every single backend: if the read fails, then
we refresh all the backends and retry the read one more time to see if
the object has appeared.
2013-01-10 15:34:56 +01:00
Vicent Martí
a22ad9fd1f Merge pull request #1219 from sba1/fetch-example-return-fix
Don't call pthread_exit() in the callback of the fetch example
2013-01-10 06:01:00 -08:00
Sebastian Bauer
cea994b902 Don't call pthread_exit() in the callback.
Compilers that are not aware that pthread_exit() does not return
issue a warning when compiling the present code. This change
exchanges the call to pthread_exit() with a simple return
statement. According to the pthread specification this is
equivalent.
2013-01-10 12:39:17 +01:00
Sebastian Bauer
ccd298bb22 Ignore build-amiga 2013-01-10 10:05:39 +01:00
Sebastian Bauer
b41e24a65c Add -fPIC only if BUILD_SHARED_LIBS is ON 2013-01-10 09:20:43 +01:00
Sebastian Bauer
707ede8633 Compile regexp dependency when AMIGA is defined.
Before it was compiled when CMake was actually run on AmigaOS.
2013-01-10 09:19:11 +01:00
Sebastian Bauer
c57c4af327 Disable SSL when compiling for AmigaOS for now. 2013-01-10 09:16:39 +01:00
Sebastian Bauer
e9bb730c36 Added missing curly brackets and fixed compiler warnings. 2013-01-10 09:16:14 +01:00
Ben Straub
520dcc1c00 Move credential helpers to their own (optional) header 2013-01-09 13:31:17 -08:00
Ben Straub
ffb02b1630 Expose stock user/pass credential utility 2013-01-09 13:31:17 -08:00
Vicent Martí
252b24049c Merge pull request #1214 from schu/push-handle-tags
push: properly handle tags
2013-01-09 08:43:19 -08:00
Michael Schubert
abeefbbe18 push: properly handle tags
Currently, push doesn't really handle tags when queueing objects. Fix
it.
2013-01-09 17:05:21 +01:00
Michael Schubert
f85b62840a tests-clar/network: remove unused CREATE_BLOB 2013-01-09 16:44:12 +01:00
Jameson Miller
087f64d3e3 Relax refspecs accepted by push 2013-01-09 16:15:58 +01:00
Vicent Martí
11fccddcb5 Merge pull request #1212 from arrbee/fix-diff-empty-file
Resolve crash with diff against empty file
2013-01-08 17:16:47 -08:00
Russell Belfer
de59055017 Resolve crash with diff against empty file
It is not legal inside our `p_mmap` function to mmap a zero length
file.  This adds a test that exercises that case inside diff and
fixes the code path where we would try to do that.

The fix turns out not to be a lot of code since our default file
content is already initialized to "" which works in this case.

Fixes #1210
2013-01-08 17:11:11 -08:00