Commit Graph

8049 Commits

Author SHA1 Message Date
Pierre-Olivier Latour
cc93ad1650 Removed unnecessary condition
The variable noid is guaranteed to be zero at this point of the code path.
2015-04-15 15:27:59 -07:00
Pierre-Olivier Latour
35df76bdd9 Use git_oid_cpy() instead of memcpy() 2015-04-15 15:27:56 -07:00
Jeff Hostetler
d06c589f48 Add MSVC CRTDBG memory leak reporting. 2015-04-15 10:25:09 -04:00
Carlos Martín Nieto
a05416951e revwalk: detect when we're out of interesting commits
When walking backwards and marking parents uninteresting, make sure we
detect when the list of commits we have left has run out of
uninteresting commits so we can stop marking commits as
uninteresting. Failing to do so can mean that we walk the whole history
marking everything uninteresting, which eats up time, CPU and IO for
with useless work.

While pre-marking does look for this, we still need to check during the
main traversal as there are setups for which pre-marking does not leave
enough information in the commits. This can happen if we push a commit
and hide its parent.
2015-04-14 03:26:45 +02:00
Carlos Martín Nieto
05d9202678 revwalk: reword the push text
As it seems it's not quite clear what it means to push a commit, try to
be more explicit about adding a new root and that we may not see this
commit if it is hidden.
2015-04-13 18:03:03 +02:00
Patrick Steinhardt
129788a623 Implement git_submodule_set_branch. 2015-04-12 10:51:08 +02:00
Edward Thomson
623fbd93f1 Merge pull request #2974 from libgit2/cmn/clone-everything
Make sure to pack referenced objects for non-branches
2015-04-10 11:38:07 +02:00
Edward Thomson
63af449e24 Merge pull request #3030 from linquize/symlink_supported
If work_dir is not specified, use repo_dir to test if symlink is supported
2015-04-10 11:33:14 +02:00
Edward Thomson
8932c32c21 Merge branch 'pr/3035' 2015-04-10 10:50:01 +02:00
Edward Thomson
eb1eb58449 Merge pull request #3038 from pks-t/fix-regcomp-retval-check
Fix checking of return value for regcomp.
2015-04-10 10:32:42 +02:00
Patrick Steinhardt
129022ee1e Fix checking of return value for regcomp.
The regcomp function returns a non-zero value if compilation of
a regular expression fails. In most places we only check for
negative values, but positive values indicate an error, as well.
Fix this tree-wide, fixing a segmentation fault when calling
git_config_iterator_glob_new with an invalid regexp.
2015-04-10 09:40:33 +02:00
Carlos Martín Nieto
50fdfe2bcb revwalk: don't insert uninteresting commits into the queue
When a commit is first set as unintersting and then pushed, we must take
care that we do not put it into the commit list as that makes us return
at least that commit (but maybe more) as we've inserted it into the list
because we have the assumption that we want anything in the commit list.
2015-04-08 23:51:49 +02:00
Carlos Martín Nieto
5a503fffbc revwalk: add failing test for hiding and then pushing a commit
When we hide a commit which we later push into the revwalk, we do not
handle this well and return commits which we should not.
2015-04-08 23:42:36 +02:00
Edward Thomson
a01d3a0b50 Merge pull request #3033 from pks-t/describe-oid-fallback
Fix describe without refs and OID fallbacks
2015-04-08 16:32:28 +02:00
Jozef Matula
2a06976165 ISO C90 forbids mixed declarations and code
GIT_UNUSED() macro generates code therefore it should be used after
variable declarations.
2015-04-08 16:30:44 +02:00
Patrick Steinhardt
08e1fd6517 describe: only abort without tags if fallback is not allowed.
When no reference names could be found we did error out when trying to describe
a commit. This is wrong, though, when the option to fall back to a commit's
object ID is set.
2015-04-07 17:32:56 +02:00
Patrick Steinhardt
c843736d63 describe example: enable building by default. 2015-04-07 14:55:05 +02:00
John Fultz
67db2bdeea Fix git_checkout_tree() to do index filemodes correctly on Windows.
git_checkout_tree() has some fallback behaviors for file systems
which don't have full support of filemodes.  Generally works fine,
but if a given file had a change of type from a 0644 to 0755 (i.e.,
you add executable permissions), the fallback behavior incorrectly
triggers when writing hte updated index.

This would cause a git_checkout_tree() command, even with the
GIT_CHECKOUT_FORCE option set, to leave a dirty index on Windows.

Also added checks to an existing test to catch this case.
2015-04-06 18:22:17 -05:00
Linquize
7c2a2172b8 Test: Create repo in while current dir is readonly and checkout symlink 2015-04-04 23:23:19 +08:00
Linquize
466d2e7a5f For bare repository, use repo_dir to test if symlinks are supported 2015-04-04 23:23:06 +08:00
Edward Thomson
47f3740025 Merge pull request #3031 from git-up/git_index_add
Entry argument passed to git_index_add_frombuffer() should be const
2015-04-04 09:17:59 -05:00
Pierre-Olivier Latour
807566d554 Entry argument passed to git_index_add_frombuffer() should be const 2015-04-03 18:59:11 -07:00
Edward Thomson
92a8194c44 Merge pull request #3022 from ethomson/gitignore_vim
gitignore: ignore vim swapfiles
2015-04-01 11:13:04 -04:00
Pierre-Olivier Latour
b978082312 Make sure to also update delta->nfiles when merging diffs
When diffs are generated, the value for the 'nfiles' field of 'git_diff_delta'
will be consistent with the value in the 'status' field. Merging diffs can
modify the 'status' field of some deltas and the 'nfiles' field needs to be
updated accordingly.
2015-03-30 14:06:21 -07:00
Edward Thomson
bb3d67625b gitignore: ignore vim swapfiles 2015-03-30 09:33:02 -04:00
Edward Thomson
de355f2341 Merge pull request #3011 from ethomson/filter_zero_tempbuf
Clear temporary buffer when filtering
2015-03-25 13:14:28 -04:00
Edward Thomson
669ae27422 filter: clear the temp_buf if we're using one
If we are using a temporary buffer for filtering, be sure to clear
it before using it, in case the file that we are filtering is empty.
2015-03-25 10:20:59 -04:00
Jacques Germishuys
7c2b9e063b Illustrate bad checkout on Windows 2015-03-25 10:20:47 -04:00
Carlos Martín Nieto
585094cc46 Merge pull request #3017 from ethomson/leaks
squash some leaks
2015-03-25 02:22:42 +01:00
Edward Thomson
78db0239db squash some leaks 2015-03-24 20:58:00 +00:00
Edward Thomson
c5e071873c Merge pull request #2990 from leoyanggit/custom_param
Add a custom param to git_smart_subtransport_definition
2015-03-24 14:03:51 -04:00
Edward Thomson
aa7a4a5077 Merge pull request #2986 from tkelman/mingw_winhttp
WinHTTP for MinGW
2015-03-24 09:06:20 -04:00
Edward Thomson
95d1624b8d Merge pull request #2947 from libgit2/cmn/notes-buf
note: use a git_buf to return the default namespace
2015-03-24 08:34:12 -04:00
Carlos Martín Nieto
5dcd2d6628 Merge pull request #2858 from pks-t/remote-squashed
examples: add remote example.
2015-03-24 10:37:12 +01:00
Carlos Martín Nieto
7c3834d124 Merge pull request #3010 from ethomson/checkout_invalid_path_err
checkout: report correct invalid path
2015-03-24 10:18:44 +01:00
Edward Thomson
3cda9cf247 checkout: report correct invalid path 2015-03-23 11:30:30 -04:00
Carlos Martín Nieto
2a0f67f04c git: make sure to close the network stream
In case of a bad url or other error during the connection setup, we
close the stream via free.
2015-03-21 21:49:27 +01:00
Edward Thomson
a3f693e9a1 Merge pull request #3003 from shawnl/master
fix changelog
2015-03-20 16:57:32 -04:00
Shawn Landden
b8c508087b fix changelog 2015-03-20 10:18:12 -07:00
Edward Thomson
8311db0cf8 Merge pull request #3000 from libgit2/vmg/mkdir-ext
mkdir-ext: Assume directories don't exist; fix all race cases
2015-03-19 15:10:58 -04:00
Vicent Marti
d88e6e9b3c mkdir-ext: Retry lstat on EEXIST race 2015-03-19 18:38:13 +01:00
Tony Kelman
b631e0d96d Use swprintf_s everywhere except mingw.org 2015-03-19 08:42:45 -07:00
Patrick Steinhardt
0a2f99fd13 examples: add remote example. 2015-03-19 08:45:34 +01:00
Carlos Martín Nieto
2c4e90f3fa Merge pull request #2996 from ethomson/dll_comments
win32 resource: allow custom comments field in DLL
2015-03-19 01:03:41 +01:00
Edward Thomson
523526e55d win32 resource: allow custom comments field in DLL 2015-03-18 18:25:14 -04:00
Edward Thomson
89ba9f1acc Merge pull request #2967 from jacquesg/merge-whitespace
Allow merges of files (and trees) with whitespace problems/fixes
2015-03-18 13:17:04 -04:00
Leo Yang
142e5379ca Add a custom param to git_smart_subtransport_definition
The smart transport has already take the payload param. For the
sub transport a payload param is useful for the implementer.
2015-03-18 13:15:21 -04:00
Carlos Martín Nieto
7568bdf4ab Merge pull request #2993 from ethomson/clar_update
clar: update to 08f434d
2015-03-18 05:04:50 +01:00
Carlos Martín Nieto
03b51b5d94 Merge pull request #2955 from git-up/update_tips_fixes
Update tips fixes
2015-03-18 05:04:12 +01:00
Carlos Martín Nieto
83ad46f726 Merge remote-tracking branch 'ethomson/submodule_8dot3' 2015-03-18 04:59:16 +01:00