|
1c04a96b
|
2017-02-28T12:29:29
|
|
Honor `core.fsyncObjectFiles`
|
|
3ac05d11
|
2017-02-17T16:48:03
|
|
win32: don't fsync parent directories on Windows
Windows doesn't support it.
|
|
2a5ad7d0
|
2017-02-17T16:42:40
|
|
fsync: call it "synchronous" object writing
Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` ->
`GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
|
|
1229e1c4
|
2017-02-17T16:36:53
|
|
fsync parent directories when fsyncing
When fsync'ing files, fsync the parent directory in the case where we
rename a file into place, or create a new file, to ensure that the
directory entry is flushed correctly.
|
|
5a747e0c
|
2016-12-27T23:07:07
|
|
git_futils_writebuffer: default only when flags==0
Only use defaults for `git_futils_writebuffer` when flags == 0, lest
(1 << 31) be treated as the defaults.
|
|
eb56ed81
|
2016-12-15T14:49:43
|
|
refdb_fs: optionally fsync packed refs
|
|
af3dcb0e
|
2016-12-15T10:56:52
|
|
refdb_fs: optionally fsync loose references
|
|
5312621b
|
2016-12-15T10:51:02
|
|
git_futils_writebuffer: optionally fsync
Add a custom `O_FSYNC` bit (if it's not been defined by the operating
system`) so that `git_futils_writebuffer` can optionally do an `fsync`
when it's done writing.
We call `fsync` ourselves, even on systems that define `O_FSYNC` because
its definition is no guarantee of its actual support. Mac, for
instance, defines it but doesn't support it in an `open(2)` call.
|
|
1c2c0ae2
|
2016-12-14T12:51:40
|
|
packbuilder: honor git_object__synchronized_writing
Honor `git_object__synchronized_writing` when creating a packfile and
corresponding index.
|
|
e6ed0d2f
|
2016-12-13T11:31:38
|
|
odb_loose: fsync tests
Introduce a simple counter that `p_fsync` implements. This is useful
for ensuring that `p_fsync` is called when we expect it to be, for
example when we have enabled an odb backend to perform `fsync`s when
writing objects.
|
|
6d3ad7e0
|
2016-12-13T10:58:43
|
|
Add `ENABLE_SYNCHRONIZED_OBJECT_CREATION` option
Allow users to enable `SYNCHRONIZED_OBJECT_CREATION` with a setting.
|
|
fc27fe21
|
2016-12-13T10:35:05
|
|
odb_loose: actually honor the fsync option
We've had an fsync option for a long time, but it was "ignored".
Stop ignoring it.
|
|
fc77891f
|
2016-12-13T10:07:42
|
|
git_filebuf: optionally fsync when committing
|
|
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
|
|
ade0d9c6
|
2017-02-13T13:46:17
|
|
commit: avoid possible use-after-free
When extracting a commit's signature, we first free the object and only
afterwards put its signature contents into the result buffer. This works
in most cases - the free'd object will normally be cached anyway, so we
only end up decrementing its reference count without actually freeing
its contents. But in some more exotic setups, where caching is disabled,
this can definitly be a problem, as we might be the only instance
currently holding a reference to this object.
Fix this issue by first extracting the contents and freeing the object
afterwards only.
|
|
dc851d9e
|
2017-02-13T13:42:16
|
|
commit: clear user-provided buffers
The functions `git_commit_header_field` and
`git_commit_extract_signature` both receive buffers used to hand back
the results to the user. While these functions called `git_buf_sanitize`
on these buffers, this is not the right thing to do, as it will simply
initialize or zero-terminate passed buffers. As we want to overwrite
contents, we instead have to call `git_buf_clear` to completely reset
them.
|
|
c576d4ff
|
2017-02-13T12:46:00
|
|
Merge pull request #4115 from gsaralms/users/gsaral/optionalOfsDelta
Changes to provide option to turn off/on ofs_delta
|
|
cdb2c2a0
|
2017-02-13T13:31:37
|
|
buffer: clarify how `git_buf_sanitize` handles non-NULL input
When `git_buf_sanitize` gets called, it converts a buffer with NULL
content to be correctly initialized. This is done by pointing it to
`git_buf__initbuf`. While the method's documentation states this
clearly, it may also lead to the conclusion that it will do the same to
buffers which do _not_ have NULL contents.
Clarify behavior when passing a buffer with non-NULL contents, where
`git_buf_sanitize` will ensure that the contents are `\0`-terminated.
|
|
4f9f8e0d
|
2017-02-13T11:10:49
|
|
Merge pull request #3436 from pks-t/libgit2-worktree
Worktree implementation
|
|
1ba242c9
|
2017-02-03T13:52:23
|
|
worktree: extract git_worktree_is_prunable
|
|
3f3a4ce7
|
2016-11-09T14:18:22
|
|
worktree: test opening worktree via gitlink, gitdir and worktree
|
|
6f6dd17c
|
2016-11-08T12:13:59
|
|
worktree: test creating and opening submodule worktrees
|
|
43275f51
|
2017-02-13T11:10:18
|
|
Merge pull request #4121 from pks-t/pks/fix-test-index-permissions
tests: fix permissions on testrepo.git index file
|
|
1fd6e035
|
2016-11-07T10:23:34
|
|
worktree: test opening discovered submodule worktrees
|
|
39abd3ad
|
2016-11-04T13:39:54
|
|
worktree: compute workdir for worktrees opened via their gitdir
When opening a worktree via the gitdir of its parent repository
we fail to correctly set up the worktree's working directory. The
problem here is two-fold: we first fail to see that the gitdir
actually is a gitdir of a working tree and then subsequently
fail to determine the working tree location from the gitdir.
The first problem of not noticing a gitdir belongs to a worktree
can be solved by checking for the existence of a `gitdir` file in
the gitdir. This file points back to the gitlink file located in
the working tree's working directory. As this file only exists
for worktrees, it should be sufficient indication of the gitdir
belonging to a worktree.
The second problem, that is determining the location of the
worktree's working directory, can then be solved by reading the
`gitdir` file in the working directory's gitdir. When we now
resolve relative paths and strip the final `.git` component, we
have the actual worktree's working directory location.
|
|
84f56cb0
|
2016-11-04T11:59:52
|
|
repository: rename `path_repository` and `path_gitlink`
The `path_repository` variable is actually confusing to think
about, as it is not always clear what the repository actually is.
It may either be the path to the folder containing worktree and
.git directory, the path to .git itself, a worktree or something
entirely different. Actually, the intent of the variable is to
hold the path to the gitdir, which is either the .git directory
or the bare repository.
Rename the variable to `gitdir` to avoid confusion. While at it,
also rename `path_gitlink` to `gitlink` to improve consistency.
|
|
384518d0
|
2015-10-27T14:17:52
|
|
repository: restrict checking out checked out branches
If a branch is already checked out in a working tree we are not
allowed to check out that branch in another repository. Introduce
this restriction when setting a repository's HEAD.
|
|
143e539f
|
2015-11-06T12:33:59
|
|
branch: restrict branch deletion for worktrees
Restrict the ability to delete branches that are checked out in
any linked repository.
|
|
e3acd37b
|
2015-11-06T12:08:15
|
|
branch: implement `git_branch_is_checked_out`
Implement a new function that is able to determine if a branch is
checked out in any repository connected to the current
repository. In particular, this is required to check if for a
given repository and branch, there exists any working tree
connected to that repository that is referencing this branch.
|
|
4321595d
|
2015-11-10T16:54:48
|
|
worktree: test basic merge functionality
|
|
04fb12ab
|
2015-10-27T12:37:51
|
|
worktree: implement functions reading HEAD
Implement `git_repository_head_for_worktree` and
`git_repository_head_detached_for_worktree` for directly accessing a
worktree's HEAD without opening it as a `git_repository` first.
|
|
f0cfc341
|
2015-10-21T13:53:18
|
|
worktree: implement `git_worktree_prune`
Implement the `git_worktree_prune` function. This function can be
used to delete working trees from a repository. According to the
flags passed to it, it can either delete the working tree's
gitdir only or both gitdir and the working directory.
|
|
2a503485
|
2015-10-21T16:03:04
|
|
worktree: implement locking mechanisms
Working trees support locking by creating a file `locked` inside
the tree's gitdir with an optional reason inside. Support this
feature by adding functions to get and set the locking status.
|
|
dea7488e
|
2015-10-23T14:11:44
|
|
worktree: implement `git_worktree_add`
Implement the `git_worktree_add` function which can be used to create
new working trees for a given repository.
|
|
372dc9ff
|
2015-10-21T13:49:55
|
|
worktree: implement `git_worktree_validate`
Add a new function that checks wether a given `struct
git_worktree` is valid. The validation includes checking if the
gitdir, parent directory and common directory are present.
|
|
8c8d726e
|
2015-10-21T12:10:30
|
|
worktree: implement `git_repository_open_from_worktree`
Add function `git_repository_open_from_worktree`, which allows to open a
`git_worktree` as repository.
|
|
a6bddf60
|
2017-02-13T10:34:08
|
|
tests: fix permissions on testrepo.git index file
|
|
d3bc09e8
|
2015-10-21T12:02:31
|
|
worktree: introduce `struct git_worktree`
Introduce a new `struct git_worktree`, which holds information
about a possible working tree connected to a repository.
Introduce functions to allow opening working trees for a
repository.
|
|
45f2b7a4
|
2015-10-21T11:48:02
|
|
worktree: implement `git_worktree_list`
Add new module for working trees with the `git_worktree_list`
function. The function lists names for all working trees of a
certain repository.
|
|
854b5c70
|
2015-10-26T16:21:09
|
|
repository: expose `repo_init_create_head`
Expose the function `repo_init_create_head` as
`git_repository_create_head`.
|
|
4292837d
|
2015-09-24T14:37:10
|
|
config: open configuration in commondir
A repository's configuartion file can always be found in the
GIT_COMMON_DIR, which has been newly introduced. For normal
repositories this does change nothing, but for working trees this
change allows to access the shared configuration file.
|
|
e9403024
|
2015-09-24T15:32:26
|
|
refdb: look for reflog in commondir
|
|
e0a6c28e
|
2015-09-16T16:09:24
|
|
refdb: introduce commondir awareness
The refdb_fs_backend is not aware of the git commondir, which
stores common objects like the o bject database and packed/loose
refereensces when worktrees are used.
Make refdb_fs_backend aware of the common directory by
introducing a new commonpath variable that points to the actual
common path of the database and using it instead of the gitdir
for the mentioned objects.
|
|
71dd0861
|
2015-09-17T11:40:55
|
|
refdb: rename refdb_fs_backend's .path to .gitpath
The variable '.path' of the refdb_fs_backend struct becomes
confusing regarding the introduction of the git commondir. It
does not immediatly become obvious what it should point to.
Fix this problem by renaming the variable to `gitpath`,
clarifying that it acutally points to the `.git` directory of the
repository, in contrast to the commonpath directory, which points
to the directory containing shared objects like references and
the object store.
|
|
79ab3ef6
|
2015-10-15T15:58:05
|
|
repository: introduce is_worktree variable
|
|
c5f3da96
|
2016-11-11T14:36:43
|
|
repository: use `git_repository_item_path`
The recent introduction of the commondir variable of a repository
requires callers to distinguish whether their files are part of
the dot-git directory or the common directory shared between
multpile worktrees. In order to take the burden from callers and
unify knowledge on which files reside where, the
`git_repository_item_path` function has been introduced which
encapsulate this knowledge.
Modify most existing callers of `git_repository_path` to use
`git_repository_item_path` instead, thus making them implicitly
aware of the common directory.
|
|
cb3269c9
|
2016-11-11T13:46:59
|
|
repository: add function to retrieve paths for repo items
|
|
c09fd54e
|
2015-09-16T12:10:11
|
|
repository: introduce commondir variable
The commondir variable stores the path to the common directory.
The common directory is used to store objects and references
shared across multiple repositories. A current use case is the
newly introduced `git worktree` feature, which sets up a separate
working copy, where the backing git object store and references
are pointed to by the common directory.
|
|
807d57e7
|
2015-11-11T10:54:41
|
|
tests: implement worktree helpers
|