|
ea3bb5c0
|
2017-03-21T18:12:02
|
|
git_repository_set_head: use tag name in reflog
When `git_repository_set_head` is provided a tag reference, update the
reflog with the tag name, like we do with a branch. This helps
consumers match the semantics of `git checkout tag`.
|
|
33ea4aae
|
2017-03-21T13:41:24
|
|
Merge pull request #4139 from richardipsum/readme-running-tests
README: Mention how to run tests
|
|
c6217973
|
2017-03-20T14:32:57
|
|
Merge pull request #4171 from rcjsuen/patch-1
Fix typo in remote.h API
|
|
12b7394c
|
2017-03-20T22:30:37
|
|
Fix typo in remote.h API
|
|
1d50f955
|
2017-03-20T11:29:27
|
|
Merge pull request #4166 from pks-t/pks/map-free-fix
Remove `map_free` macros
|
|
31059923
|
2017-03-20T12:16:18
|
|
Merge pull request #4169 from csware/absolute-symlink
|
|
c10ce7c2
|
2017-03-20T12:11:05
|
|
tests: filebuf: test writing to symlink with absolute paths
|
|
86a8cd9f
|
2017-03-20T11:21:00
|
|
filebuf: fix resolving absolute symlinks
The symlink destination is always concatenated to the original path. Fix
this by using `git_buf_sets` instead of `git_buf_puts`.
|
|
e30a6ee3
|
2017-03-20T11:06:23
|
|
Merge pull request #4160 from pks-t/pks/diff-fixes
Diff fixes
|
|
44b3b9fe
|
2017-03-20T11:05:03
|
|
Merge pull request #4162 from pks-t/pks/merge-source-fixes
merge_driver: fix const-correctness for source getters
|
|
94af9155
|
2017-03-20T09:01:18
|
|
map: remove `*map_free` macros
The `map_free` functions were not implemented as functions but instead
as macros which also set the map to NULL. While this is most certainly
sensible in most cases, we should prefer the more obvious behavior,
namingly leaving the map pointer intact.
Furthermore, this macro has been refactored incorrectly during the
map-refactorings: the two statements are not actually grouped together
by a `do { ... } while (0)` block, as it is required for macros to
match the behavior of functions more closely. This has led to at least
one subtle nesting error in `pack-objects.c`. The following code block
```
if (pb->object_ix)
git_oidmap_free(pb->object_ix);
```
would be expanded to
```
if (pb->object_ix)
git_oidmap__free(pb->object_ix); pb->object_ix = NULL;
```
which is not what one woudl expect. While it is not a bug here as it
would simply become a no-op, the wrong implementation could lead to bugs
in other occasions.
Fix this by simply removing the macro altogether and replacing it with
real function calls. This leaves the burden of setting the pointer to
NULL afterwards to the caller, but this is actually expected and behaves
like other `free` functions.
|
|
77c8ee74
|
2017-03-20T08:59:30
|
|
checkout: fix double-free of checkout_data's mkdir_map
We currently call `git_strmap_free` on `checkout_data.mkdir_map` in the
`checkout_data_clear` function. The only thing protecting us from a
double-free is that the `git_strmap_free` function is in fact not a
function, but a macro that also sets the map to NULL.
Remove the second call to `git_strmap_free` and explicitly set the map
member to NULL.
|
|
6dfb983c
|
2017-03-15T15:03:45
|
|
Merge pull request #4161 from pks-t/pks/submodule-index-fix
submodule: catch when submodule is not staged on update
|
|
bb342159
|
2017-03-15T11:46:15
|
|
merge_driver: fix const-correctness for source getters
|
|
8051b47f
|
2017-03-15T08:20:26
|
|
Merge branch 'gumenikav/merge_driver_source_info'
|
|
0608d5df
|
2017-03-06T12:30:31
|
|
merge_driver: add unresolved getters for git_merge_driver_source
|
|
13bf4d7f
|
2017-03-14T15:04:18
|
|
Merge pull request #4146 from pks-t/pks/winhttp-errors
winhttp: disambiguate error messages when sending requests
|
|
32ecc98e
|
2017-03-14T14:53:32
|
|
submodule: catch when submodule is not staged on update
When calling `git_submodule_update` on a submodule, we have to retrieve
the ID of the submodule entry in the index. If the function is called on
a submodule which is only partly initialized, the submodule entry may
not be added to the index yet. This leads to an assert when trying to
look up the blob later on.
Fix the issue by checking if the index actually holds the submodule's
ID and erroring out if it does not.
|
|
c0eba379
|
2017-03-14T11:01:19
|
|
diff_parse: correctly set options for parsed diffs
The function `diff_parsed_alloc` allocates and initializes a
`git_diff_parsed` structure. This structure also contains diff options.
While we initialize its flags, we fail to do a real initialization of
its values. This bites us when we want to actually use the generated
diff as we do not se the option's version field, which is required to
operate correctly.
Fix the issue by executing `git_diff_init_options` on the embedded
struct.
|
|
ad5a909c
|
2017-03-14T09:39:37
|
|
patch_parse: fix parsing minimal trailing diff line
In a diff, the shortest possible hunk with a modification (that is, no
deletion) results from a file with only one line with a single character
which is removed. Thus the following hunk
@@ -1 +1 @@
-a
+
is the shortest valid hunk modifying a line. The function parsing the
hunk body though assumes that there must always be at least 4 bytes
present to make up a valid hunk, which is obviously wrong in this case.
The absolute minimum number of bytes required for a modification is
actually 2 bytes, that is the "+" and the following newline. Note: if
there is no trailing newline, the assumption will not be offended as the
diff will have a line "\ No trailing newline" at its end.
This patch fixes the issue by lowering the amount of bytes required.
|
|
62a2fc06
|
2017-03-14T13:06:25
|
|
patch_generate: move `git_diff_foreach` to diff.c
Now that the `git_diff_foreach` function does not depend on internals of
the `git_patch_generated` structure anymore, we can easily move it to
the actual diff code.
|
|
ace3508f
|
2017-03-14T10:37:47
|
|
patch_generate: fix `git_diff_foreach` only working with generated diffs
The current logic of `git_diff_foreach` makes the assumption that all
diffs passed in are actually derived from generated diffs. With these
assumptions we try to derive the actual diff by inspecting either the
working directory files or blobs of a repository. This obviously cannot
work for diffs parsed from a file, where we do not necessarily have a
repository at hand.
Since the introduced split of parsed and generated patches, there are
multiple functions which help us to handle patches generically, being
indifferent from where they stem from. Use these functions and remove
the old logic specific to generated patches. This allows re-using the
same code for invoking the callbacks on the deltas.
|
|
41019152
|
2017-03-14T10:01:56
|
|
patch_generate: remove duplicated logic
Under the existing logic, we try to load patch contents differently,
depending on whether the patch files stem from the working directory or
not. But actually, the executed code paths are completely equal to each
other -- so we were always the code despite the condition.
Remove the condition altogether and conflate both code paths.
|
|
53454be8
|
2017-03-11T19:52:05
|
|
Merge pull request #4157 from adamniedzielski/4099-git-sort-time-uninteresting
Skip uninteresting commits in revwalk timesort iterator
|
|
0b3623ac
|
2017-03-11T19:09:27
|
|
Merge pull request #4156 from libgit2/ethomson/readbuffer_dont_hash
git_futils_readbuffer: don't compute sha-1
|
|
ffd4df6b
|
2017-03-09T16:32:38
|
|
Merge pull request #4151 from novalis/dturner/rebase-submodule-untracked
rebase: ignore untracked files in submodules
|
|
c11c08a5
|
2017-03-09T14:01:10
|
|
Skip uninteresting commits in revwalk timesort iterator
Fixes #4099
|
|
11c8e756
|
2017-03-09T12:26:23
|
|
git_futils_readbuffer: don't compute sha-1
Don't compute the sha-1 in `git_futils_readbuffer_updated` unless the
checksum was requested. This means that `git_futils_readbuffer` will
not calculate the checksum unnecessarily.
|
|
b31b2360
|
2017-03-06T15:53:57
|
|
Merge pull request #4154 from libgit2/ethomson/namespaces
Support namespaced references again
|
|
83580562
|
2017-03-06T13:14:47
|
|
refdb_fs: honor the namespace
|
|
d24ae06d
|
2017-03-06T13:13:47
|
|
refs::namespace: add namespace tests
These simple tests only ensure that we enforce the existence of a
namespace; these mirror the rugged tests, they are not exhaustive.
|
|
5c06111b
|
2017-02-25T17:13:15
|
|
README: Mention how to run tests
|
|
2270ca9f
|
2017-03-03T13:27:47
|
|
rebase: ignore untracked files in submodules
An untracked file in a submodule should not prevent a rebase from
starting. Even if the submodule's SHA is changed, and that file would
conflict with a new tracked file, it's still OK to start the rebase
and discover the conflict later.
Signed-off-by: David Turner <dturner@twosigma.com>
|
|
467185ff
|
2017-03-03T16:12:12
|
|
Merge pull request #4150 from libgit2/ethomson/freshen_trees
git_commit_create: freshen tree objects in commit
|
|
52d03f37
|
2017-03-03T13:26:29
|
|
git_commit_create: freshen tree objects in commit
Freshen the tree object that a commit points to during commit time.
|
|
3348570a
|
2017-03-03T12:36:36
|
|
Merge pull request #4136 from libgit2/ethomson/sha1dc
Introduce (optional) SHA1 collision attack detection
|
|
9f128d2a
|
2017-03-02T20:56:47
|
|
cmake: drop unset `SHA1_TYPE`
We never set `SHA1_TYPE` to `builtin`. Don't bother testing for it.
|
|
d087c8f8
|
2017-02-24T14:14:56
|
|
hash: test for sha1 collision attack detection
|
|
2dfd1294
|
2017-02-24T13:34:01
|
|
hash: include sha1collisiondetection
Include the SHA1 collision attack detection library from
https://github.com/cr-marcstevens/sha1collisiondetection
|
|
a371a8ae
|
2017-02-24T13:03:15
|
|
hash: rename implementation selection constants
|
|
ba2bc491
|
2017-03-01T14:51:39
|
|
Merge pull request #4148 from pks-t/pks/fix-haiku-builds
cmake: only enable supported compiler warning flags
|
|
a02e8a38
|
2017-03-01T13:58:15
|
|
cmake: only enable supported compiler warning flags
We currently unconditionally enable the "-Wall" and "-Wextra" flags.
Some platforms rely on compilers which do not support these flags,
though. One of these platforms is Haiku, which does not support
"-Wextra" due to being stuck on GCC version 2.
Fix builds on such platforms by adding these flags only if supported by
the compiler.
|
|
a454641e
|
2017-03-01T08:45:48
|
|
Merge pull request #4145 from pks-t/pks/refs-create-memleak
tests: refs::create: fix memory leak
|
|
b65a5e9b
|
2017-03-01T07:58:40
|
|
winhttp: disambiguate error messages when sending requests
|
|
5aa1f12a
|
2017-03-01T07:45:14
|
|
tests: refs::create: fix memory leak
|
|
cf8e9a3a
|
2017-03-01T07:35:44
|
|
Merge pull request #4143 from richardipsum/issue-4094
Fix: make reflog include "(merge)" for merge commits
|
|
397cf1a1
|
2017-02-28T22:22:02
|
|
Add test for inclusion of (merge) in reflog
This test ensures that the string '(merge)' is included in the reflog
when a merge commit is made.
|
|
1255a9ac
|
2017-02-26T13:34:13
|
|
Fix: make reflog include "(merge)" for merge commits
This fixes issue #4094
|
|
a4b5ac64
|
2017-02-26T16:12:30
|
|
Merge pull request #4138 from richardipsum/symbolic-create-arbitrary-tgt-test
tests: Add create__symbolic_with_arbitrary_content
|
|
55d911d6
|
2017-02-26T16:08:00
|
|
Merge pull request #4142 from pblesi/patch-1
Fix minor typos in CONVENTIONS.md
|
|
6313a208
|
2017-02-26T16:01:32
|
|
Merge pull request #4141 from kainjow/patch-2
Fix inet_pton tests triggering an assert in Haiku
|
|
c1239e33
|
2017-02-25T23:09:42
|
|
Fix minor typos in CONVENTIONS.md
|
|
40170177
|
2017-02-25T10:21:59
|
|
Fix inet_pton tests triggering an assert in Haiku
Haiku will assert in a nightly build if the "dst" input to inet_pton() is NULL.
|
|
b84e58f4
|
2017-02-25T14:17:10
|
|
Whitespace and style fixes
Use C style comments as per style guide,
and fix mismatching indentation.
|
|
d2b3a21f
|
2017-01-22T00:21:30
|
|
tests: Add create__symbolic_with_arbitrary_content
This test ensures that it's possible to create a symbolic ref that
has arbitrary data as its target. It also ensures it's possible
to obtain the target of that symbolic reference from the git_reference
object.
|
|
7143145f
|
2017-02-25T12:45:14
|
|
Merge pull request #4137 from libgit2/ethomson/appveyor
appveyor: don't rewrite the system mingw
|
|
408a7b77
|
2017-02-24T17:37:00
|
|
appveyor: don't rewrite system mingw
Download mingw-w64 into our build directory and execute it there, don't
try to overwrite the system's mingw.
|
|
c3abb1d2
|
2017-02-24T17:38:42
|
|
appveyor: always build the 'appveyor' branch
The 'appveyor' branch is useful for testing AppVeyor builds.
|
|
7f875fb4
|
2017-02-24T08:51:50
|
|
Merge pull request #4133 from stinb/khash-cleanup-regression
fix regression from #4092
|
|
685f2251
|
2017-02-22T09:29:00
|
|
pack: fix looping over cache entries
Fixes a regression from #4092. This is a crash on 32-bit and I assume that
it doesn't do the right thing on 64-bit either. MSVC emits a warning for this,
but of course, it's easy to get lost among all of the similar 'possible loss
of data' warnings.
|
|
c03f00ea
|
2017-02-22T16:30:57
|
|
Merge pull request #4131 from pks-t/pks/attrcache-cleanups
Attrcache cleanups
|
|
86201b92
|
2017-02-22T16:17:54
|
|
Merge pull request #4135 from libgit2/ethomson/ancient_gcc_not_threadsafe
Provide error on gcc < 4.1 when THREADSAFE
|
|
aa5ea47f
|
2017-02-22T10:34:19
|
|
Provide error on gcc < 4.1 when THREADSAFE
Provide a descriptive error message when compiling THREADSAFE on gcc
versions < 4.1. We require the atomic primitives (eg
`__sync_synchronize`) that were introduced in that version.
(Note, clang setes `__GNUC__` but appears to set its version > 4.1.)
|
|
ce6f61da
|
2017-02-21T15:14:04
|
|
attrcache: remove useless `do_init` indirection
Remove useless indirection from `git_attr_cache__init` to
`git_attr_cache__do_init`. The difference is that the
`git_attr_cache__init` macro first checks if the cache is already
initialized and, if so, not call `git_attr_cache__do_init`. But
actually, `git_attr_cache__do_init` already does the same thing and
returns immediately if the cache is already initialized.
Remove the indirection.
|
|
c1151010
|
2017-02-21T11:52:15
|
|
attrcache: replace existing file entry with `git__swap`
When doing an upsert of a file, we used to use `git__compare_and_swap`,
comparing the entry's file which is to be replaced with itself. This can
be more easily formulated by using `git__swap`, which unconditionally
replaces the value.
|
|
b8ab782a
|
2017-02-21T11:43:32
|
|
attrcache: do not lock/unlock the mutex directly
Improve encapsulation by not referencing the attrcache mutex directly
but instead using the `attr_cache_lock` and `attr_cache_unlock`
functions.
|
|
b13f0da1
|
2017-02-17T16:32:14
|
|
Merge pull request #4130 from libgit2/ethomson/clar_messages
Improve clar messages
|
|
c52480fd
|
2017-02-17T13:01:49
|
|
`cl_git_exec` -> `cl_git_expect`
|
|
a1dcc830
|
2017-02-17T12:13:35
|
|
tests: provide better pass/failure error messages
Provide more detailed messages when conditions pass or fail
unexpectedly. In particular, this provides the error messages when a
test fails with a different error code than was expected.
|
|
cc172642
|
2017-02-17T12:10:19
|
|
p_snprintf: no need for arguments to a format
`snprintf` requires a _format_ but does not require _arguments_ to the
format. eg: `snprintf(buf, 42, "hi")` is perfectly legal. Expand the
macro to match.
Without this, `p_sprintf(buf, 42, "hi")` errors with:
```
error: expected expression
p_snprintf(msg, 42, "hi");
^
src/unix/posix.h:53:34: note: expanded from macro 'p_snprintf'
^
/usr/include/secure/_stdio.h:57:73: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str),
__VA_ARGS__)
```
|
|
d0c72a92
|
2017-02-17T12:41:05
|
|
Merge pull request #4092 from pks-t/pks/khash-cleanups
khash cleanups
|
|
8f1ff26b
|
2017-02-02T13:09:32
|
|
idxmap: remove GIT__USE_IDXMAP
|
|
cee9ca66
|
2017-02-02T12:20:17
|
|
idxmap: convert to use functions instead of macros
|
|
8f5fe903
|
2017-02-02T11:58:48
|
|
offmap: remove GIT__USE_OFFMAP macro
|
|
cf6124d6
|
2017-02-02T11:57:31
|
|
offmap: convert to use functions instead of macros
|
|
0d716905
|
2017-01-27T15:23:15
|
|
oidmap: remove GIT__USE_OIDMAP macro
|
|
659f5d07
|
2017-01-27T14:53:23
|
|
oidmap: convert macros to functions
|
|
13c3bc9a
|
2017-01-27T14:32:23
|
|
strmap: remove GIT__USE_STRMAP macro
|
|
a13cfd2a
|
2017-01-27T14:13:49
|
|
strmap: convert macros to functions
|
|
f14f75d4
|
2017-02-02T13:08:52
|
|
khash: avoid using `kh_resize` directly
|
|
73028af8
|
2017-01-27T14:20:24
|
|
khash: avoid using macro magic to get return address
|
|
85d2748c
|
2017-01-27T14:05:10
|
|
khash: avoid using `kh_key`/`kh_val` as lvalue
|
|
f31cb45a
|
2017-01-25T15:31:12
|
|
khash: avoid using `kh_put` directly
|
|
a8cd560b
|
2017-01-25T14:41:17
|
|
khash: avoid using `kh_del` directly
|
|
71a54317
|
2017-01-25T14:32:23
|
|
khash: avoid using `kh_key` directly
|
|
cb18386f
|
2017-01-25T14:26:58
|
|
khash: avoid using `kh_val`/`kh_value` directly
|
|
76e671a6
|
2017-01-25T14:20:56
|
|
khash: avoid using `kh_exist` directly
|
|
c37b069b
|
2017-01-25T14:16:35
|
|
khash: avoid using `kh_clear` directly
|
|
a853c527
|
2017-01-25T14:14:32
|
|
khash: avoid using `kh_get` directly
|
|
64e46dc3
|
2017-01-25T14:14:12
|
|
khash: avoid using `kh_end` directly
|
|
036daa59
|
2017-01-25T14:11:42
|
|
khash: use `git_map_exists` where applicable
|
|
9694d9ba
|
2017-01-25T14:09:17
|
|
khash: avoid using `kh_foreach`/`kh_foreach_value` directly
|
|
63e914cb
|
2017-01-25T14:05:24
|
|
khash: avoid using `kh_size` directly
|
|
a1b23df5
|
2017-01-27T14:15:45
|
|
offmap: remove unused macro `git_offmap_insert2`
|
|
bff9b7a5
|
2017-01-25T14:12:13
|
|
strmap: remove unused macro `git_strmap_insert2`
|
|
021f4943
|
2017-02-17T11:14:53
|
|
Merge pull request #4124 from pks-t/pks/worktree-refs
refdb: catch additional per-worktree refs
|
|
95248be7
|
2017-02-16T22:30:33
|
|
Merge pull request #4127 from Uncommon/comment
Minor comment fix
|
|
19874e29
|
2017-02-16T08:40:49
|
|
Minor comment fix
|
|
6da6b425
|
2017-02-14T11:13:32
|
|
refdb: catch additional per-worktree refs
The upstream git.git project currently identifies all references inside
of `refs/bisect/` as well as `HEAD` as per-worktree references. This is
already incorrect and is currently being fixed by an in-flight topic
[1]. The new behavior will be to match all pseudo-references outside of
the `refs/` hierarchy as well as `refs/bisect/`.
Our current behavior is to mark a selection of pseudo-references as
per-worktree, only. This matches more pseudo-references than current
git, but forgets about `refs/bisect/`. Adjust behavior to match the
in-flight topic, that is classify the following references as
per-worktree:
- everything outside of `refs/`
- everything inside of `refs/bisect/`
[1]: <20170213152011.12050-1-pclouds@gmail.com>
|
|
a59545de
|
2017-02-13T14:38:12
|
|
Merge pull request #4122 from pks-t/pks/signature-dbl-free
Signature cleanups
|