Russell Belfer
56543a609a
Clear up warnings from cppcheck
...
The cppcheck static analyzer generates warnings for a bunch of
places in the libgit2 code base. All the ones fixed in this
commit are actually false positives, but I've reorganized the
code to hopefully make it easier for static analysis tools to
correctly understand the structure. I wouldn't do this if I
felt like it was making the code harder to read or worse for
humans, but in this case, these fixes don't seem too bad and will
hopefully make it easier for better analysis tools to get at any
real issues.
2013-02-15 16:02:45 -08:00
Vicent Martí
fcd7733ded
Merge pull request #1318 from nulltoken/topic/diff-tree-coverage
...
Topic/diff tree coverage
2013-02-14 12:49:46 -08:00
Ben Straub
6a0ffe84a7
Merge pull request #1333 from phkelley/push_options
...
Add git_push_options, to set packbuilder parallelism
2013-02-12 10:50:55 -08:00
Russell Belfer
fbe67de997
Merge pull request #1246 from arrbee/fix-force-text-for-diff-blobs
...
Add FORCE_TEXT check into git_diff_blobs code path
2013-02-12 10:16:30 -08:00
Russell Belfer
9c258af094
Merge pull request #1316 from ben/clone-cancel
...
Allow network operations to cancel
2013-02-12 10:13:56 -08:00
Russell Belfer
c2c0874de2
More diff tests with binary data
2013-02-11 14:45:46 -08:00
nulltoken
2bca5b679b
remote: Introduce git_remote_is_valid_name()
...
Fix libgit2/libgit2sharp#318
2013-02-11 23:19:41 +01:00
nulltoken
4d811c3b77
refs: No component of a refname can end with '.lock'
2013-02-11 23:19:40 +01:00
nulltoken
624924e876
remote: reorganize tests
2013-02-11 23:19:39 +01:00
Russell Belfer
390a3c8141
Merge pull request #1190 from nulltoken/topic/reset-paths
...
reset: Allow the selective reset of pathspecs
2013-02-11 11:44:00 -08:00
Philip Kelley
e026cfee00
Merge pull request #1323 from jamill/resolve_remote
...
Resolve a remote branch's remote
2013-02-11 09:12:39 -08:00
Jameson Miller
db4bb4158f
Teach refspec to transform destination reference to source reference
2013-02-11 11:36:28 -05:00
Jameson Miller
2e3e8c889b
Teach remote branch to return its remote
2013-02-11 11:36:22 -05:00
Philip Kelley
b8b897bbc5
Add git_push_options, to set packbuilder parallelism
2013-02-11 09:35:26 -05:00
Philip Kelley
8c29dca6c3
Fix some incorrect MSVC #ifdef's. Fixes #1305
2013-02-11 09:25:57 -05:00
Scott J. Goldman
6ce61a0bf6
tests: fix whitespace in refs/rename.c
2013-02-08 14:25:41 -08:00
yorah
0d64ba4837
diff: add a notify callback to git_diff__from_iterators
...
The callback will be called for each file, just before the `git_delta_t` gets inserted into the diff list.
When the callback:
- returns < 0, the diff process will be aborted
- returns > 0, the delta will not be inserted into the diff list, but the diff process continues
- returns 0, the delta is inserted into the diff list, and the diff process continues
2013-02-07 20:44:35 +01:00
Scott J. Goldman
c9459abb61
tests: fix indentation in repo/message.c
2013-02-07 03:12:39 -08:00
Scott J. Goldman
f7b060188a
tests: fix indentation in repo/init.c
2013-02-07 03:04:50 -08:00
Scott J. Goldman
1ca163ff13
tests: fix code style in threads/basic.c
2013-02-07 02:04:17 -08:00
Ben Straub
beede4321f
Fetchhead: don't expect a tag that isn't there
2013-02-06 13:25:43 -08:00
Ben Straub
169fa384fe
Fix fetchhead tests to expect nearly-dangling
2013-02-06 13:16:13 -08:00
nulltoken
e8993455d1
diff: Enhance tree-to-tree diff test coverage
...
These tests are related to issue libgit2/libgit2sharp#196
2013-02-06 19:45:44 +01:00
nulltoken
7e8580452c
diff: refactor git_diff_tree_to_tree() tests
2013-02-06 16:13:23 +01:00
nulltoken
f093cd62c4
Add unsymlinked.git test repository
2013-02-06 16:03:06 +01:00
Ben Straub
def60ea473
Allow all non-zero returns to cancel transfers
2013-02-05 13:14:48 -08:00
Ben Straub
42385c96d5
Enhance test coverage for transfer cancellation
2013-02-05 12:10:08 -08:00
nulltoken
3ad052218c
Fix MSVC compilation warnings
...
Fix #1308
2013-02-05 20:33:27 +01:00
nulltoken
d96aa8a9ca
tests: Remove useless code
2013-02-05 20:33:16 +01:00
nulltoken
a0c34c9406
reset: Introduce git_reset_default()
2013-02-05 20:33:03 +01:00
Ben Straub
fe95ac1b67
Allow progress callback to cancel fetch
...
This works by having the indexer watch the return
code of the callback, so will only take effect
on object boundaries.
2013-02-05 10:59:58 -08:00
Russell Belfer
de81aee390
Merge pull request #1298 from ben/user-at
...
Handle "user@" prefix for credentials partially included in URLs
2013-02-04 14:49:28 -08:00
nulltoken
0e8e5a6189
revparse: Lookup sha before branch
2013-02-03 11:44:26 +01:00
nulltoken
545b479a07
revparse: Lookup branch before described tag
...
Fix #1306
2013-02-03 11:18:24 +01:00
Ben Straub
329eee3387
Merge pull request #1286 from lznuaa/master
...
Fix clone fail if repo head detached
2013-02-01 09:41:50 -08:00
Frank Li
aa928de02a
Add test case for clone head detached repo
...
Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
2013-02-01 22:40:23 +08:00
Ben Straub
54ffc1f773
HTTP: use creds in url if available
2013-01-31 14:41:01 -08:00
Ben Straub
cd74cbba18
Plug test leaks
2013-01-31 14:38:22 -08:00
Ben Straub
cf7038a65c
Enhance url parsing to include passwords
2013-01-31 14:04:21 -08:00
Carlos Martín Nieto
e5ef0f1814
refs: handle ALLOW_ONELEVEL normalization with leading slash
...
A leading slash confuses the name normalization code when the flags
include ALLOW_ONELEVEL. Catch this case in particular to avoid
triggering an assertion in the uppercase check which expects us not to
pass it an empty string.
The existing tests don't catch this as they simply use the NORMAL
flag.
This fixes #1300 .
2013-01-31 20:23:30 +01:00
Ben Straub
7602cb7c0e
Add user-from-url param to auth callback
2013-01-31 10:44:57 -08:00
Ben Straub
5f10853e90
Skip "user@" when finding hostname in url
2013-01-30 18:52:47 -08:00
Russell Belfer
3bf68be443
Free buffer at end of test
2013-01-30 11:25:20 -08:00
Russell Belfer
f1e2735c74
Add helper for diff line stats
...
This adds a `git_diff_patch_line_stats()` API that gets the total
number of adds, deletes, and context lines in a patch. This will
make it a little easier to emulate `git diff --stat` and the like.
Right now, this relies on generating the `git_diff_patch` object,
which is a pretty heavyweight way to get stat information. At
some future point, it would probably be nice to be able to get
this information without allocating the entire `git_diff_patch`,
but that's a much larger project.
2013-01-30 11:10:39 -08:00
Vicent Martí
d204121657
Merge pull request #1296 from arrbee/stricter-config-name-checks
...
Stricter config entry name validation
2013-01-29 13:57:53 -08:00
Russell Belfer
4657fc1cab
Merge pull request #1285 from phkelley/vector
...
Vector improvements and their fallout
2013-01-29 13:54:08 -08:00
Russell Belfer
501d35ccf8
Test config name validation
...
This is @nulltoken's work to test various invalid config section
and key names and make sure we are validating properly.
2013-01-29 12:16:59 -08:00
Russell Belfer
17c92beaca
Test buf join with NULL behavior explicitly
2013-01-29 12:13:24 -08:00
Congyi Wu
96447d24f3
Fix 2 bugs in online::push tests.
...
- Fix stack corruption introduced in 9bccf33c due to passing pointer to
local variable _cred_acquire_called.
- Fix strcmp in do_verify_push_status when expected or actual push_status
is NULL
2013-01-28 16:56:56 -05:00
Philip Kelley
11d9f6b304
Vector improvements and their fallout
2013-01-27 14:17:07 -05:00