]> git.proxmox.com Git - libgit2.git/log
libgit2.git
11 years agoDisable caching in Clar
Vicent Marti [Wed, 20 Feb 2013 17:49:00 +0000 (18:49 +0100)]
Disable caching in Clar

11 years agoMerge pull request #1344 from arrbee/fix-static-analyzer-issues
Vicent Martí [Sun, 17 Feb 2013 10:41:58 +0000 (02:41 -0800)]
Merge pull request #1344 from arrbee/fix-static-analyzer-issues

Fix static analyzer issues

11 years agoClear up warnings from cppcheck
Russell Belfer [Sat, 16 Feb 2013 00:02:45 +0000 (16:02 -0800)]
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.

11 years agoFix memory leak in p_getaddrinfo on Amiga
Russell Belfer [Sat, 16 Feb 2013 00:01:31 +0000 (16:01 -0800)]
Fix memory leak in p_getaddrinfo on Amiga

If gethostbyname() fails on platforms with NO_ADDRINFO, the code
leaks the struct addrinfo that was allocated.  This fixes that
(and a number of code formatting issues in that area of code in
src/posix.c).

11 years agoAdd rudimentary error checks and reformat comments
Russell Belfer [Fri, 15 Feb 2013 23:58:13 +0000 (15:58 -0800)]
Add rudimentary error checks and reformat comments

There were a number of functions assigning their return value to
`error` without much explanation.  I added in some rudimentary
error checking to help flesh out the example.

Also, I reformatted all of the comments down to 80 cols (and in
some cases, slightly updated the wording).

11 years agoMerge pull request #1342 from ghedo/development
Vicent Martí [Fri, 15 Feb 2013 12:21:41 +0000 (04:21 -0800)]
Merge pull request #1342 from ghedo/development

push: fix typo in git_push_finish() doc

11 years agopush: fix typo in git_push_finish() doc
Alessandro Ghedini [Fri, 15 Feb 2013 12:12:03 +0000 (13:12 +0100)]
push: fix typo in git_push_finish() doc

11 years agoMerge pull request #1318 from nulltoken/topic/diff-tree-coverage
Vicent Martí [Thu, 14 Feb 2013 20:49:46 +0000 (12:49 -0800)]
Merge pull request #1318 from nulltoken/topic/diff-tree-coverage

Topic/diff tree coverage

11 years agoMerge pull request #1340 from schu/push-docs
Vicent Martí [Thu, 14 Feb 2013 19:33:47 +0000 (11:33 -0800)]
Merge pull request #1340 from schu/push-docs

push: improve docs on success / failure of git_push_finish

11 years agopush: improve docs on success / failure of git_push_finish
Michael Schubert [Thu, 14 Feb 2013 19:20:18 +0000 (20:20 +0100)]
push: improve docs on success / failure of git_push_finish

11 years agoFix a leak when canceling a network operation
Ben Straub [Thu, 14 Feb 2013 16:12:05 +0000 (08:12 -0800)]
Fix a leak when canceling a network operation

11 years agoFix a git_filebuf leak (fixes Win32 clone::can_cancel)
Philip Kelley [Thu, 14 Feb 2013 13:46:58 +0000 (08:46 -0500)]
Fix a git_filebuf leak (fixes Win32 clone::can_cancel)

11 years agoMerge pull request #1335 from phkelley/development
Vicent Martí [Thu, 14 Feb 2013 11:58:11 +0000 (03:58 -0800)]
Merge pull request #1335 from phkelley/development

Improve MSVC compiler, linker flags

11 years agoChange git2.rc to identify git.dll as VOS_NT_WINDOWS32
Philip Kelley [Wed, 13 Feb 2013 23:12:51 +0000 (18:12 -0500)]
Change git2.rc to identify git.dll as VOS_NT_WINDOWS32

11 years agoImprove MSVC compiler, linker flags
Philip Kelley [Wed, 13 Feb 2013 17:36:41 +0000 (12:36 -0500)]
Improve MSVC compiler, linker flags

11 years agoMerge pull request #1333 from phkelley/push_options
Ben Straub [Tue, 12 Feb 2013 18:50:55 +0000 (10:50 -0800)]
Merge pull request #1333 from phkelley/push_options

Add git_push_options, to set packbuilder parallelism

11 years agoMerge pull request #1246 from arrbee/fix-force-text-for-diff-blobs
Russell Belfer [Tue, 12 Feb 2013 18:16:30 +0000 (10:16 -0800)]
Merge pull request #1246 from arrbee/fix-force-text-for-diff-blobs

Add FORCE_TEXT check into git_diff_blobs code path

11 years agoMerge pull request #1316 from ben/clone-cancel
Russell Belfer [Tue, 12 Feb 2013 18:13:56 +0000 (10:13 -0800)]
Merge pull request #1316 from ben/clone-cancel

Allow network operations to cancel

11 years agoMore diff tests with binary data
Russell Belfer [Mon, 11 Feb 2013 22:44:56 +0000 (14:44 -0800)]
More diff tests with binary data

11 years agoReorganize FORCE_TEXT diff flag checks
Russell Belfer [Mon, 11 Feb 2013 21:29:07 +0000 (13:29 -0800)]
Reorganize FORCE_TEXT diff flag checks

11 years agoAdd FORCE_TEXT check into git_diff_blobs code path
Russell Belfer [Tue, 15 Jan 2013 17:24:17 +0000 (09:24 -0800)]
Add FORCE_TEXT check into git_diff_blobs code path

`git_diff_blobs` and `git_diff_blob_to_buffer` skip the step
where we check file attributes because they don't have a filename
associated with the data. Unfortunately, this meant they were also
skipping the check for the GIT_DIFF_FORCE_TEXT option and so you
could not force a diff of an apparent binary file.  This adds the
force text check into their code path.

11 years agoMerge pull request #1324 from nulltoken/topic/remote_isvalidname
Russell Belfer [Mon, 11 Feb 2013 22:35:41 +0000 (14:35 -0800)]
Merge pull request #1324 from nulltoken/topic/remote_isvalidname

Topic/remote isvalidname

11 years agoremote: Introduce git_remote_is_valid_name()
nulltoken [Thu, 7 Feb 2013 22:44:18 +0000 (23:44 +0100)]
remote: Introduce git_remote_is_valid_name()

Fix libgit2/libgit2sharp#318

11 years agorefs: No component of a refname can end with '.lock'
nulltoken [Thu, 7 Feb 2013 22:40:10 +0000 (23:40 +0100)]
refs: No component of a refname can end with '.lock'

11 years agoremote: reorganize tests
nulltoken [Thu, 7 Feb 2013 22:02:56 +0000 (23:02 +0100)]
remote: reorganize tests

11 years agoMerge pull request #1190 from nulltoken/topic/reset-paths
Russell Belfer [Mon, 11 Feb 2013 19:44:00 +0000 (11:44 -0800)]
Merge pull request #1190 from nulltoken/topic/reset-paths

reset: Allow the selective reset of pathspecs

11 years agoMerge pull request #1323 from jamill/resolve_remote
Philip Kelley [Mon, 11 Feb 2013 17:12:39 +0000 (09:12 -0800)]
Merge pull request #1323 from jamill/resolve_remote

Resolve a remote branch's remote

11 years agoTeach refspec to transform destination reference to source reference
Jameson Miller [Thu, 7 Feb 2013 19:53:52 +0000 (14:53 -0500)]
Teach refspec to transform destination reference to source reference

11 years agoTeach remote branch to return its remote
Jameson Miller [Fri, 8 Feb 2013 16:05:47 +0000 (11:05 -0500)]
Teach remote branch to return its remote

11 years agoAdd git_push_options, to set packbuilder parallelism
Philip Kelley [Mon, 11 Feb 2013 13:28:53 +0000 (08:28 -0500)]
Add git_push_options, to set packbuilder parallelism

11 years agoFix some incorrect MSVC #ifdef's. Fixes #1305
Philip Kelley [Mon, 11 Feb 2013 14:25:57 +0000 (09:25 -0500)]
Fix some incorrect MSVC #ifdef's. Fixes #1305

11 years agoFix a bug introduced in df93a681 'Merge the push...'
Philip Kelley [Sun, 10 Feb 2013 23:16:10 +0000 (18:16 -0500)]
Fix a bug introduced in df93a681 'Merge the push...'

11 years agoFix -Wmaybe-uninitialized warning
Michael Schubert [Sun, 10 Feb 2013 18:36:39 +0000 (19:36 +0100)]
Fix -Wmaybe-uninitialized warning

11 years agoMerge pull request #1320 from cscheid/development
Vicent Martí [Sat, 9 Feb 2013 07:47:38 +0000 (23:47 -0800)]
Merge pull request #1320 from cscheid/development

removed other references to api.html

11 years agoMerge pull request #1327 from phkelley/development
Vicent Martí [Sat, 9 Feb 2013 07:46:53 +0000 (23:46 -0800)]
Merge pull request #1327 from phkelley/development

Merge the push report into the refs to avoid a 3rd network call

11 years agotests: fix whitespace in refs/rename.c
Scott J. Goldman [Fri, 8 Feb 2013 22:25:41 +0000 (14:25 -0800)]
tests: fix whitespace in refs/rename.c

11 years agoMerge the push report into the refs to avoid a 3rd network call
Philip Kelley [Fri, 8 Feb 2013 20:00:08 +0000 (15:00 -0500)]
Merge the push report into the refs to avoid a 3rd network call

11 years agoFix Windows symlinks
Jameson Miller [Fri, 8 Feb 2013 19:27:21 +0000 (14:27 -0500)]
Fix Windows symlinks

11 years agoMerge pull request #1249 from yorah/topic/diff-notify-unmatched-pathspecs
Russell Belfer [Fri, 8 Feb 2013 18:02:37 +0000 (10:02 -0800)]
Merge pull request #1249 from yorah/topic/diff-notify-unmatched-pathspecs

diff: Add a callback to notify of diffed files

11 years agoMerge pull request #1325 from SHyx0rmZ/fix-windows-symlinks
Vicent Martí [Fri, 8 Feb 2013 10:50:23 +0000 (02:50 -0800)]
Merge pull request #1325 from SHyx0rmZ/fix-windows-symlinks

Fix Windows symlinks

11 years agoMoved braces to conform to code style
Patrick Pokatilo [Fri, 8 Feb 2013 10:29:23 +0000 (11:29 +0100)]
Moved braces to conform to code style

11 years agoReplace LoadLibrary with GetModuleHandle, since kernel32 is loaded by default
Patrick Pokatilo [Fri, 8 Feb 2013 02:24:45 +0000 (03:24 +0100)]
Replace LoadLibrary with GetModuleHandle, since kernel32 is loaded by default

As requested

11 years agoReplace call to strnlen with call to strlen
Patrick Pokatilo [Fri, 8 Feb 2013 00:26:04 +0000 (01:26 +0100)]
Replace call to strnlen with call to strlen

11 years agoInclude <string.h>
Patrick Pokatilo [Fri, 8 Feb 2013 00:10:03 +0000 (01:10 +0100)]
Include <string.h>

11 years agoFix call to readlink
Patrick Pokatilo [Thu, 7 Feb 2013 23:50:20 +0000 (00:50 +0100)]
Fix call to readlink

11 years agodiff: add a notify callback to `git_diff__from_iterators`
yorah [Fri, 25 Jan 2013 16:35:46 +0000 (17:35 +0100)]
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

11 years agoReturn the matched pathspec pattern in `git_pathspec_match_path`
yorah [Fri, 18 Jan 2013 15:37:13 +0000 (16:37 +0100)]
Return the matched pathspec pattern in `git_pathspec_match_path`

Instead of returning directly the pattern as the return value, I used an
out parameter, because the function also tests if the passed pathspecs
vector is empty. If yes, it considers that the path "matches", but in
that case there is no matched pattern per se.

11 years agoMerge pull request #1322 from phkelley/development
Ben Straub [Thu, 7 Feb 2013 18:13:24 +0000 (10:13 -0800)]
Merge pull request #1322 from phkelley/development

No bitfields in public headers b/c packing is compiler-specific

11 years agoNo bitfields in public headers b/c packing is compiler-specific
Philip Kelley [Thu, 7 Feb 2013 17:47:29 +0000 (12:47 -0500)]
No bitfields in public headers b/c packing is compiler-specific

11 years agotests: fix indentation in repo/message.c
Scott J. Goldman [Thu, 7 Feb 2013 11:12:39 +0000 (03:12 -0800)]
tests: fix indentation in repo/message.c

11 years agotests: fix indentation in repo/init.c
Scott J. Goldman [Thu, 7 Feb 2013 11:04:50 +0000 (03:04 -0800)]
tests: fix indentation in repo/init.c

11 years agotests: fix code style in threads/basic.c
Scott J. Goldman [Thu, 7 Feb 2013 10:04:17 +0000 (02:04 -0800)]
tests: fix code style in threads/basic.c

11 years agoCall p_readlink to determine symlink size
Patrick Pokatilo [Thu, 7 Feb 2013 00:41:20 +0000 (01:41 +0100)]
Call p_readlink to determine symlink size

11 years agoremoved other references to api.html
Carlos Scheidegger [Wed, 6 Feb 2013 22:37:51 +0000 (17:37 -0500)]
removed other references to api.html

11 years agoMerge pull request #1319 from cscheid/development
Vicent Martí [Wed, 6 Feb 2013 22:21:28 +0000 (14:21 -0800)]
Merge pull request #1319 from cscheid/development

removed obsolete reference to api.html

11 years agoremoved obsolete reference to api.html
Carlos Scheidegger [Wed, 6 Feb 2013 21:55:09 +0000 (16:55 -0500)]
removed obsolete reference to api.html

11 years agoFetchhead: don't expect a tag that isn't there
Ben Straub [Wed, 6 Feb 2013 21:25:43 +0000 (13:25 -0800)]
Fetchhead: don't expect a tag that isn't there

11 years agoFix fetchhead tests to expect nearly-dangling
Ben Straub [Wed, 6 Feb 2013 21:16:13 +0000 (13:16 -0800)]
Fix fetchhead tests to expect nearly-dangling

11 years agoClone: fetch all tags
Ben Straub [Wed, 6 Feb 2013 21:07:56 +0000 (13:07 -0800)]
Clone: fetch all tags

11 years agoExpect standard error code from internal calls
Ben Straub [Wed, 6 Feb 2013 19:02:29 +0000 (11:02 -0800)]
Expect standard error code from internal calls

11 years agodiff: Enhance tree-to-tree diff test coverage
nulltoken [Wed, 15 Aug 2012 18:08:09 +0000 (20:08 +0200)]
diff: Enhance tree-to-tree diff test coverage

These tests are related to issue libgit2/libgit2sharp#196

11 years agodiff: refactor git_diff_tree_to_tree() tests
nulltoken [Wed, 6 Feb 2013 15:06:17 +0000 (16:06 +0100)]
diff: refactor git_diff_tree_to_tree() tests

11 years agoAdd unsymlinked.git test repository
nulltoken [Wed, 15 Aug 2012 16:49:01 +0000 (18:49 +0200)]
Add unsymlinked.git test repository

11 years agoAllow all non-zero returns to cancel transfers
Ben Straub [Tue, 5 Feb 2013 21:14:48 +0000 (13:14 -0800)]
Allow all non-zero returns to cancel transfers

11 years agoEnhance test coverage for transfer cancellation
Ben Straub [Tue, 5 Feb 2013 20:10:08 +0000 (12:10 -0800)]
Enhance test coverage for transfer cancellation

11 years agoDocument callback-triggered cancellation
Ben Straub [Tue, 5 Feb 2013 20:03:41 +0000 (12:03 -0800)]
Document callback-triggered cancellation

11 years agoFix MSVC compilation warnings
nulltoken [Tue, 5 Feb 2013 15:52:56 +0000 (16:52 +0100)]
Fix MSVC compilation warnings

Fix #1308

11 years agotests: Remove useless code
nulltoken [Sun, 20 Jan 2013 17:24:54 +0000 (18:24 +0100)]
tests: Remove useless code

11 years agoreset: Introduce git_reset_default()
nulltoken [Sun, 20 Jan 2013 12:27:28 +0000 (13:27 +0100)]
reset: Introduce git_reset_default()

11 years agoAllow progress callback to cancel fetch
Ben Straub [Tue, 5 Feb 2013 18:59:58 +0000 (10:59 -0800)]
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.

11 years agoreset: Enhance documentation
nulltoken [Sun, 20 Jan 2013 11:08:12 +0000 (12:08 +0100)]
reset: Enhance documentation

11 years agoindex: Fix indentations
nulltoken [Tue, 15 Jan 2013 15:12:12 +0000 (16:12 +0100)]
index: Fix indentations

11 years agoindex: Enhance documentation
nulltoken [Tue, 15 Jan 2013 10:03:05 +0000 (11:03 +0100)]
index: Enhance documentation

11 years agoMerge pull request #1315 from nulltoken/development
Vicent Martí [Tue, 5 Feb 2013 14:18:23 +0000 (06:18 -0800)]
Merge pull request #1315 from nulltoken/development

cMakeList: Prevent MSVCR1x0.dll dependency

11 years agocMakeList: Prevent MSVCR1x0.dll dependency
nulltoken [Tue, 5 Feb 2013 13:32:09 +0000 (14:32 +0100)]
cMakeList: Prevent MSVCR1x0.dll dependency

Deploys the libgit2/libgit2@9041250 fix to RELWITHDEBINFO
and MINSIZEREL build flavors

Fix #255

11 years agoMerge pull request #1298 from ben/user-at
Russell Belfer [Mon, 4 Feb 2013 22:49:28 +0000 (14:49 -0800)]
Merge pull request #1298 from ben/user-at

Handle "user@" prefix for credentials partially included in URLs

11 years agoAddress feedback
Ben Straub [Mon, 4 Feb 2013 21:52:18 +0000 (13:52 -0800)]
Address feedback

11 years agoMerge pull request #1307 from nulltoken/fix/revparse_describe
Vicent Martí [Sun, 3 Feb 2013 16:41:47 +0000 (08:41 -0800)]
Merge pull request #1307 from nulltoken/fix/revparse_describe

revparse: Lookup branch before described tag

11 years agorevparse: Lookup sha before branch
nulltoken [Sun, 3 Feb 2013 10:44:26 +0000 (11:44 +0100)]
revparse: Lookup sha before branch

11 years agorevparse: Lookup branch before described tag
nulltoken [Sat, 2 Feb 2013 16:36:20 +0000 (17:36 +0100)]
revparse: Lookup branch before described tag

Fix #1306

11 years agoUse malloc rather than calloc
Ben Straub [Sat, 2 Feb 2013 03:21:55 +0000 (19:21 -0800)]
Use malloc rather than calloc

11 years agoMerge pull request #1303 from csware/win32_consistent_error_encoding
Vicent Martí [Fri, 1 Feb 2013 23:57:31 +0000 (15:57 -0800)]
Merge pull request #1303 from csware/win32_consistent_error_encoding

Win32: Make sure error messages are consistently UTF-8 encoded

11 years agoDeduplicate FormatMessage UTF-16 to UTF-8 conversion code
Sven Strickroth [Fri, 1 Feb 2013 21:53:51 +0000 (22:53 +0100)]
Deduplicate FormatMessage UTF-16 to UTF-8 conversion code

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoImproved error handling
Sven Strickroth [Fri, 1 Feb 2013 21:22:26 +0000 (22:22 +0100)]
Improved error handling

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoMerge pull request #1299 from csware/support_local_msysgit_install
Vicent Martí [Fri, 1 Feb 2013 23:37:45 +0000 (15:37 -0800)]
Merge pull request #1299 from csware/support_local_msysgit_install

Support local msysgit installations

11 years agoMerge pull request #1302 from jamill/global_config_lookup
Vicent Martí [Fri, 1 Feb 2013 23:31:01 +0000 (15:31 -0800)]
Merge pull request #1302 from jamill/global_config_lookup

Try harder to find global config file

11 years agoGet utf8_size from WideCharToMultiByte instead of guessing it
Sven Strickroth [Fri, 1 Feb 2013 21:14:52 +0000 (22:14 +0100)]
Get utf8_size from WideCharToMultiByte instead of guessing it

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoWin32: Make sure error messages are consistently UTF-8 encoded
Sven Strickroth [Fri, 1 Feb 2013 15:17:34 +0000 (16:17 +0100)]
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>
11 years agoTry harder to find global config file
Jameson Miller [Fri, 1 Feb 2013 19:23:26 +0000 (14:23 -0500)]
Try harder to find global config file

11 years agoIntroduce git__substrdup
Ben Straub [Fri, 1 Feb 2013 18:00:55 +0000 (10:00 -0800)]
Introduce git__substrdup

11 years agoMerge pull request #1286 from lznuaa/master
Ben Straub [Fri, 1 Feb 2013 17:41:50 +0000 (09:41 -0800)]
Merge pull request #1286 from lznuaa/master

Fix clone fail if repo head detached

11 years agoAdd test case for clone head detached repo
Frank Li [Tue, 29 Jan 2013 09:26:42 +0000 (17:26 +0800)]
Add test case for clone head detached repo

Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
11 years agoStick to coding style: Move up braces
Sven Strickroth [Fri, 1 Feb 2013 09:32:05 +0000 (10:32 +0100)]
Stick to coding style: Move up braces

Signed-off-by: Sven Strickroth <email@cs-ware.de>
11 years agoRemove double-free segfaults
Ben Straub [Thu, 31 Jan 2013 23:24:59 +0000 (15:24 -0800)]
Remove double-free segfaults

11 years agoWinHttp: use cred in url if provided
Ben Straub [Thu, 31 Jan 2013 22:54:58 +0000 (14:54 -0800)]
WinHttp: use cred in url if provided

11 years agoHTTP: use creds in url if available
Ben Straub [Thu, 31 Jan 2013 22:41:01 +0000 (14:41 -0800)]
HTTP: use creds in url if available

11 years agoPlug test leaks
Ben Straub [Thu, 31 Jan 2013 22:38:22 +0000 (14:38 -0800)]
Plug test leaks

11 years agoEnhance url parsing to include passwords
Ben Straub [Thu, 31 Jan 2013 22:04:21 +0000 (14:04 -0800)]
Enhance url parsing to include passwords

11 years agoMerge pull request #1300 from carlosmn/ref-leading-slash
Russell Belfer [Thu, 31 Jan 2013 21:20:20 +0000 (13:20 -0800)]
Merge pull request #1300 from carlosmn/ref-leading-slash

Crash when resolving a ref starting with "/"

11 years agorefs: handle ALLOW_ONELEVEL normalization with leading slash
Carlos Martín Nieto [Thu, 31 Jan 2013 19:23:30 +0000 (20:23 +0100)]
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.