Commit Graph

8090 Commits

Author SHA1 Message Date
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
Edward Thomson
4c2e6b1e87 Merge pull request #2985 from claudiuolteanu/patch-1
Lower case the include directive of windows header
2015-03-17 23:35:52 -04:00
Edward Thomson
fa8a38a490 Merge pull request #2983 from jeffhostetler/jeffhostetler/perf_merge_lazy_binary_check
PERF: In MERGE, lazily compute is_binary
2015-03-17 22:22:38 -04:00
Edward Thomson
08c29c4451 clar: update to 08f434d 2015-03-17 19:04:48 -04:00
Edward Thomson
f0593a6b52 Merge pull request #2991 from sba1/fix-uninitialized-data-access-remote-update-tips
Initialize refs vector in git_remote_update_tips().
2015-03-17 18:35:28 -04:00
Sebastian Bauer
cdedef4061 Initialize refs vector in git_remote_update_tips().
Otherwise, bailing out early when ls_to_vector() fails accesses
uninitialized memory.
2015-03-17 22:03:51 +01:00
Carlos Martín Nieto
c84a9dd2da local: recusrively insert non-branch objects into the packfile
When we insert e.g. a tag or tagged object into the packfile, we must
make sure to insert any referenced objects as well, or we will have
broken links.

Use the recursive version of packfile insertion to make sure we send
over not just the tagged object but also the objects it references.
2015-03-17 20:51:47 +01:00
Carlos Martín Nieto
84511143fd tree: add more correct error messages for not found
Don't use the full path, as that's not what we are asserting does not
exist, but just the subpath we were looking up.
2015-03-17 20:51:14 +01:00
Carlos Martín Nieto
a61fa4c0c7 packbuilder: introduce git_packbuilder_insert_recur()
This function recursively inserts the given object and any referenced
ones. It can be thought of as a more general version of the functions to
insert a commit or tree.
2015-03-17 20:51:14 +01:00
Carlos Martín Nieto
d23fb5c943 clone: add failing test for local transport with a tag
When there is a tag, we must make sure that we get all referenced
objects from this tag as well. This failing test shows that e.g. when
there is a tagged tree, we insert the top tree but do not descend, thus
causing the clone to have broken links.
2015-03-17 20:50:39 +01:00