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
Ben Straub
630146bd1b
Address feedback
2013-02-04 13:52:18 -08:00
Vicent Martí
3261a3e980
Merge pull request #1307 from nulltoken/fix/revparse_describe
...
revparse: Lookup branch before described tag
2013-02-03 08:41:47 -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
15760c598d
Use malloc rather than calloc
2013-02-01 19:21:55 -08:00
Vicent Martí
e963166019
Merge pull request #1303 from csware/win32_consistent_error_encoding
...
Win32: Make sure error messages are consistently UTF-8 encoded
2013-02-01 15:57:31 -08:00
Sven Strickroth
c70455c75e
Deduplicate FormatMessage UTF-16 to UTF-8 conversion code
...
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-02-02 00:55:32 +01:00
Sven Strickroth
bd25a302d3
Improved error handling
...
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-02-02 00:52:23 +01:00
Vicent Martí
db37d3de79
Merge pull request #1299 from csware/support_local_msysgit_install
...
Support local msysgit installations
2013-02-01 15:37:45 -08:00
Vicent Martí
219571a232
Merge pull request #1302 from jamill/global_config_lookup
...
Try harder to find global config file
2013-02-01 15:31:01 -08:00
Sven Strickroth
89ad1c57a3
Get utf8_size from WideCharToMultiByte instead of guessing it
...
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-02-01 22:17:34 +01:00
Sven Strickroth
b0dc81f055
Win32: Make sure error messages are consistently UTF-8 encoded
...
W/o this a libgit2 error message could have a mixed encoding:
e.g. a filename in UTF-8 combined with a native Windows error message
encoded with the local code page.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-02-01 21:54:32 +01:00
Jameson Miller
91f13a18d5
Try harder to find global config file
2013-02-01 14:23:26 -05:00
Ben Straub
c4beee7681
Introduce git__substrdup
2013-02-01 10:00:55 -08: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
Sven Strickroth
45792c923b
Stick to coding style: Move up braces
...
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-02-01 10:32:05 +01:00
Ben Straub
8c36a3cdba
Remove double-free segfaults
2013-01-31 15:24:59 -08:00
Ben Straub
016179d668
WinHttp: use cred in url if provided
2013-01-31 14:54:58 -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
Russell Belfer
7c32a0b5f7
Merge pull request #1300 from carlosmn/ref-leading-slash
...
Crash when resolving a ref starting with "/"
2013-01-31 13:20:20 -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
Sven Strickroth
01e7128f39
Added Sven Strickroth to AUTHORS
...
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-01-31 19:48:00 +01:00
Sven Strickroth
c55378fce5
Detect msysgit installation of users without admin rights
...
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-01-31 19:47:35 +01:00
Sven Strickroth
ec56af08a9
Refactored: Move msysgit registry detection to it's own function
...
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-01-31 19:46:07 +01:00
Ben Straub
7602cb7c0e
Add user-from-url param to auth callback
2013-01-31 10:44:57 -08:00
Ben Straub
2234b2b031
Stash username from url (but don't use it yet)
2013-01-30 19:03:58 -08:00
Ben Straub
5f10853e90
Skip "user@" when finding hostname in url
2013-01-30 18:52:47 -08:00
Vicent Martí
5f9f69d983
Merge pull request #1297 from arrbee/diff-patch-line-totals
...
Add helper API for diff line stats from patch
2013-01-30 14:45:12 -08:00
Vicent Martí
a8182d495d
Let people know that the ML is deprecated
2013-01-30 12:24:38 -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
Vicent Martí
ea53203c38
Merge pull request #1295 from carlosmn/obsd
...
Fix p_realpath on OpenBSD
2013-01-29 13:54:30 -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
Philip Kelley
590365db54
Now with no multiply
2013-01-29 16:49:12 -05: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
1e7799e8b8
Implement config key validation rules
...
This is a new implementation of core git's config key checking
rules that prevents non-alphanumeric characters (and '-') for
the top-level section and key names inside of config files.
This also validates the target section name when renaming
sections.
2013-01-29 12:15:18 -08:00
Russell Belfer
17c92beaca
Test buf join with NULL behavior explicitly
2013-01-29 12:13:24 -08:00
Carlos Martín Nieto
67fcac567b
Fix p_realpath on OpenBSD
...
OpenBSD's realpath(3) doesn't require the last part of the path to
exist. Override p_realpath in this OS to bring it in line with the
library's assumptions.
2013-01-29 18:46:17 +01:00
Vicent Martí
764b9e7146
Merge pull request #1289 from jwiegley/development
...
Added git_treebuilder_entrycount
2013-01-28 14:54:19 -08:00
John Wiegley
5fb9820664
Added git_treebuilder_entrycount
...
Conflicts:
src/tree.c
2013-01-28 16:35:43 -06: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
Vicent Martí
e1859ea184
Merge pull request #1283 from lznuaa/master
...
Fix local repository clone failure
2013-01-27 13:15:48 -08:00
Philip Kelley
11d9f6b304
Vector improvements and their fallout
2013-01-27 14:17:07 -05:00
Frank Li
28c3beaa59
Fix fail clone local repo which head detatched
...
Set head detach if can't found branch after download
Signed-off-by: Frank Li <lznuaa@gmail.com>
2013-01-27 15:02:06 +08:00