|
ccad5a99
|
2015-12-28T11:22:48
|
|
Merge pull request #3565 from ethomson/templates
Handle dotfiles as the repo template dir and inside the template dir
|
|
62602547
|
2015-12-26T22:39:22
|
|
git_repository_init: include dotfiles when copying templates
Include dotfiles when copying template directory, which will handle
both a template directory itself that begins with a dotfile, and
any dotfiles inside the directory.
|
|
00282183
|
2015-12-26T22:32:17
|
|
repo::init tests: test a template dir with leading dot
Ensure that we can handle template directories that begin with a
leading dot.
|
|
5c042c5b
|
2015-12-26T22:06:45
|
|
repo::init tests: test init.templatedir setting
Ensure that `git_repository_init` honors the `init.templatedir`
configuration setting.
|
|
a066b4cb
|
2015-12-26T18:31:22
|
|
Merge pull request #3552 from ReadmeCritic/master
Update README URLs based on HTTP redirects
|
|
1ce509fe
|
2015-12-26T15:51:32
|
|
Update libgit2-glib link
|
|
869320a8
|
2015-12-26T16:55:29
|
|
Merge pull request #3546 from Cruel/master
Fix a couple function signatures
|
|
3d29b12c
|
2015-12-23T23:38:59
|
|
Merge pull request #3560 from drusk/readme_typo
Fixed minor typo in README.md.
|
|
22829b74
|
2015-12-23T21:27:40
|
|
Fixed minor typo in README.md.
|
|
e9c0d796
|
2015-12-21T21:47:10
|
|
Merge pull request #3554 from olshevskiy87/master
typos in comments
|
|
91f0d186
|
2015-12-21T20:49:14
|
|
typos in comments
|
|
1181ca0c
|
2015-12-17T08:36:04
|
|
Update README URLs based on HTTP redirects
|
|
9ec6839a
|
2015-12-17T10:29:58
|
|
Merge pull request #3551 from libgit2/vmg/commit-leak
commit: Fix memory leak in test suite
|
|
5951445f
|
2015-12-17T10:13:04
|
|
commit: Fix memory leak in test suite
|
|
1850c99c
|
2015-12-17T10:09:02
|
|
Merge pull request #3550 from libgit2/vmg/index-fill-2
Index fill: Small fixups
|
|
4baf2d8b
|
2015-12-16T21:58:47
|
|
Merge pull request #3548 from tepas/patch-1
fix git_blob_create_fromchunks documentation
|
|
ef8b7feb
|
2015-12-16T19:36:50
|
|
index: Also size-hint the hash table
Note that we're not checking whether the resize succeeds; in OOM cases,
we let it run with a "small" vector and hash table and see if by chance
we can grow it dynamically as we insert the new entries. Nothing to
lose really.
|
|
d7d46cfb
|
2015-12-16T17:00:25
|
|
index: Preallocate the entries vector with size hint
|
|
0cc20a8c
|
2015-12-16T16:53:06
|
|
index: Adjust namemask & mode when filling
|
|
f824259e
|
2015-12-16T15:18:42
|
|
Merge pull request #3549 from libgit2/vmg/index-fill
merge: Use `git_index__fill` to populate the index
|
|
879ebab3
|
2015-12-16T12:30:52
|
|
merge: Use `git_index__fill` to populate the index
Instead of calling `git_index_add` in a loop, use the new
`git_index_fill` internal API to fill the index with the initial staged
entries.
The new `fill` helper assumes that all the entries will be unique and
valid, so it can append them at the end of the entries vector and only
sort it once at the end. It performs no validation checks.
This prevents the quadratic behavior caused by having to sort the
entries list once after every insertion.
|
|
cf339ede
|
2015-12-16T09:25:18
|
|
fix git_blob_create_fromchunks documentation
putting `0.` at the start of the line turns it into a numbered list.
|
|
95746a57
|
2015-12-14T19:21:09
|
|
Fix a couple function signatures
|
|
7f2c1469
|
2015-12-14T13:54:02
|
|
Merge pull request #3528 from chescock/Passthrough-from-credential-callback
Treat GIT_PASSTHROUGH as though git_cred_acquire_cb isn't set.
|
|
30c8e260
|
2015-12-14T13:53:26
|
|
Merge pull request #3521 from pks-t/blame-line-overflow
Line count overflow in git_blame_hunk and git_blame__entry
|
|
6aa06b65
|
2015-12-10T12:14:09
|
|
Merge pull request #3522 from pks-t/email-format-commit-message
diff: include commit message when formatting patch
|
|
dc49eb58
|
2015-12-10T11:57:44
|
|
Merge pull request #3538 from pks-t/pks/index-memory-leak
index: always queue `remove_entry` for removal
|
|
0a294217
|
2015-12-09T20:56:04
|
|
Merge pull request #3542 from libgit2/cmn/reset-dir-file
reset: perform the checkout before moving HEAD or the index
|
|
465c3b38
|
2015-12-09T19:16:11
|
|
reset: perform the checkout before moving HEAD or the index
This keeps the state of the workdir the same as one from HEAD, removing
a source of possible confusion when calculating the work that is to be
done.
|
|
82885255
|
2015-12-09T13:57:15
|
|
CHANGELOG: add some things we missed
|
|
21b1e015
|
2015-12-08T21:11:58
|
|
Merge pull request #3539 from libgit2/typedef-submodule-cb
Use a typedef for the submodule_foreach callback.
|
|
d698929c
|
2015-12-08T13:12:27
|
|
Merge pull request #3537 from libgit2/cmn/tree-is-sorted
tree: mark a tree as already sorted
|
|
ab273821
|
2015-12-08T11:58:19
|
|
Play nice with the docs.
|
|
eda726cf
|
2015-12-08T11:34:00
|
|
Use a typedef for the submodule_foreach callback.
This fits with the style for the rest of the project, but more
importantly, makes life easier for bindings authors who auto-generate
code.
|
|
b057fdef
|
2015-12-08T16:00:35
|
|
index: always queue `remove_entry` for removal
When replacing an index with a new one, we need to iterate
through all index entries in order to determine which entries are
equal. When it is not possible to re-use old entries for the new
index, we move it into a list of entries that are to be removed
and thus free'd.
When we encounter a non-zero error code, though, we skip adding
the current index entry to the remove-queue. `INSERT_MAP_EX`,
which is the function last run before adding to the remove-queue,
may return a positive non-zero code that indicates what exactly
happened while inserting the element. In this case we skip adding
the entry to the remove-queue but still continue the current
operation, leading to a leak of the current entry.
Fix this by checking for a negative return value instead of a
non-zero one when we want to add the current index entry to the
remove-queue.
|
|
fc436469
|
2015-12-06T22:51:00
|
|
tree: mark a tree as already sorted
The trees are sorted on-disk, so we don't have to go over them
again. This cuts almost a fifth of time spent parsing trees.
|
|
a3dc4190
|
2015-12-06T18:11:54
|
|
Merge pull request #3526 from sschuberth/cmake-number-compare
CMakeLists: Compare CMAKE_SIZEOF_VOID_P as a number, not as a string
|
|
8febe654
|
2015-12-06T18:11:37
|
|
Merge pull request #3529 from mgorny/fix-checkout-test-umask
checkout test: Apply umask to file-mode test as well
|
|
5d1f31c6
|
2015-12-03T17:42:52
|
|
Merge pull request #3530 from libgit2/cmn/parse-mode
tree: use a specialised mode parse function
|
|
2d36e145
|
2015-12-03T23:37:37
|
|
Merge pull request #3534 from ethomson/index_canonicalize_fix
index: canonicalize inserted paths safely
|
|
626f9e24
|
2015-12-03T16:27:15
|
|
index: canonicalize inserted paths safely
When adding to the index, we look to see if a portion of the given
path matches a portion of a path in the index. If so, we will use
the existing path information. For example, when adding `foo/bar.c`,
if there is an index entry to `FOO/other` and the filesystem is case
insensitive, then we will put `bar.c` into the existing tree instead
of creating a new one with a different case.
Use `strncmp` to do that instead of `memcmp`. When we `bsearch`
into the index, we locate the position where the new entry would
go. The index entry at that position does not necessarily have
a relation to the entry we're adding, so we cannot make assumptions
and use `memcmp`. Instead, compare them as strings.
When canonicalizing paths, we look for the first index entry that
matches a given substring.
|
|
0174f21b
|
2015-12-02T18:56:31
|
|
tree: use a specialised mode parse function
Instead of going out to strtol, which is made to parse generic numbers,
copy a parse function from git which is specialised for file modes.
|
|
0878ca9b
|
2015-10-07T10:31:07
|
|
CMakeLists: Compare CMAKE_SIZEOF_VOID_P as a number, not as a string
|
|
326c9fc2
|
2015-12-01T20:41:23
|
|
checkout test: Apply umask to file-mode test as well
Fix the file-mode test to expect system umask being applied to the
created file as well (it is currently applied to the directory only).
This fixes the test on systems where umask != 022.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
efd9ab56
|
2015-11-20T11:26:26
|
|
Treat GIT_PASSTHROUGH as though git_cred_acquire_cb isn't set.
|
|
15e6a5af
|
2015-12-01T08:45:55
|
|
Merge pull request #3527 from pks-t/pks/tree-entry-memleak
tree: mark cloned tree entries as un-pooled
|
|
9487585d
|
2015-12-01T14:19:29
|
|
tree: mark cloned tree entries as un-pooled
When duplicating a `struct git_tree_entry` with
`git_tree_entry_dup` the resulting structure is not allocated
inside a memory pool. As we do a 1:1 copy of the original struct,
though, we also copy the `pooled` field, which is set to `true`
for pooled entries. This results in a huge memory leak as we
never free tree entries that were duplicated from a pooled
tree entry.
Fix this by marking the newly duplicated entry as un-pooled.
|
|
254e0a33
|
2015-11-24T13:43:43
|
|
diff: include commit message when formatting patch
When formatting a patch as email we do not include the commit's
message in the formatted patch output. Implement this and add a
test that verifies behavior.
|
|
7f8fe1d4
|
2015-12-01T10:03:56
|
|
commit: introduce `git_commit_body`
It is already possible to get a commit's summary with the
`git_commit_summary` function. It is not possible to get the
remaining part of the commit message, that is the commit
message's body.
Fix this by introducing a new function `git_commit_body`.
|
|
944dbd12
|
2015-11-24T10:52:17
|
|
blame: use size_t for line counts in git_blame__entry
The `git_blame__entry` struct keeps track of line counts with
`int` fields. Since `int` is only guaranteed to be at least 16
bits we may overflow on certain platforms when line counts exceed
2^15.
Fix this by instead storing line counts in `size_t`.
|
|
cb1cb24c
|
2015-11-24T10:18:58
|
|
blame: use size_t for line counts in git_blame_hunk
It is not unreasonable to have versioned files with a line count
exceeding 2^16. Upon blaming such files we fail to correctly keep
track of the lines as `git_blame_hunk` stores them in `uint16_t`
fields.
Fix this by converting the line fields of `git_blame_hunk` to
`size_t`. Add test to verify behavior.
|
|
337b2b08
|
2015-11-30T20:53:54
|
|
Merge pull request #3508 from libgit2/cmn/tree-parse-speed
Improvements to tree parsing speed
|
|
a589f22a
|
2015-11-30T20:41:54
|
|
Merge pull request #3525 from pks-t/pks/fix-nested-struct-warning
Compiler warning fixes
|
|
bbd2fa4e
|
2015-11-30T18:05:27
|
|
object: remove unused constant OBJECT_BASE_SIZE
|
|
a7bd157e
|
2015-11-30T17:40:49
|
|
tests: fix warning for nested struct initialization
|
|
95ae3520
|
2015-11-30T17:32:18
|
|
tree: ensure the entry filename fits in 16 bits
Return an error in case the length is too big. Also take this
opportunity to have a single allocating function for the size and
overflow logic.
|
|
a27f31d8
|
2015-11-30T04:49:31
|
|
Merge pull request #3513 from ethomson/merge_recursive
Recursive Merge
|
|
ee42bb0e
|
2015-11-28T19:18:29
|
|
tree: make path len uint16_t and avoid holes
This reduces the size of the struct from 32 to 26 bytes, and leaves a
single padding byte at the end of the struct (which comes from the
zero-length array).
|
|
2580077f
|
2015-11-15T00:44:02
|
|
tree: calculate the filename length once
We already know the size due to the `memchr()` so use that information
instead of calling `strlen()` on it.
|
|
ed970748
|
2015-11-14T23:50:06
|
|
tree: pool the entry memory allocations
These are rather small allocations, so we end up spending a non-trivial
amount of time asking the OS for memory. Since these entries are tied to
the lifetime of their tree, we can give the tree a pool so we speed up
the allocations.
|
|
7132150d
|
2015-11-14T23:46:21
|
|
tree: avoid advancing over the filename multiple times
We've already looked at the filename with `memchr()` and then used
`strlen()` to allocate the entry. We already know how much we have to
advance to get to the object id, so add the filename length instead of
looking at each byte again.
|
|
5b9c63c3
|
2015-11-20T19:01:42
|
|
recursive merge: add a recursion limit
|
|
78859c63
|
2015-11-20T17:33:49
|
|
merge: handle conflicts in recursive base building
When building a recursive merge base, allow conflicts to occur.
Use the file (with conflict markers) as the common ancestor.
The user has already seen and dealt with this conflict by virtue
of having a criss-cross merge. If they resolved this conflict
identically in both branches, then there will be no conflict in the
result. This is the best case scenario.
If they did not resolve the conflict identically in the two branches,
then we will generate a new conflict. If the user is simply using
standard conflict output then the results will be fairly sensible.
But if the user is using a mergetool or using diff3 output, then the
common ancestor will be a conflict file (itself with diff3 output,
haha!). This is quite terrible, but it matches git's behavior.
|
|
34a51428
|
2015-11-09T11:55:26
|
|
merge tests: add complex recursive example
|
|
651bfd69
|
2015-11-09T08:24:47
|
|
recursive: test conflict output during recursive merge
|
|
dcde5720
|
2015-11-09T08:23:27
|
|
merge tests: move expected data into own file
|
|
76ade3a0
|
2015-11-10T21:21:26
|
|
merge: use annotated commits for recursion
Use annotated commits to act as our virtual bases, instead of regular
commits, to avoid polluting the odb with virtual base commits and
trees. Instead, build an annotated commit with an index and pointers
to the commits that it was merged from.
|
|
7730fe8e
|
2015-11-09T13:01:48
|
|
merge: merge annotated commits instead of regular commits
|
|
3f2bb387
|
2015-10-28T11:00:55
|
|
merge: octopus merge common ancestors when >2
When there are more than two common ancestors, continue merging the
virtual base with the additional common ancestors, effectively
octopus merging a new virtual base.
|
|
b1eef912
|
2015-10-27T18:00:30
|
|
merge: add recursive test with conflicting contents
|
|
1b82f7b6
|
2015-10-27T14:24:51
|
|
merge: compute octopus merge bases
|
|
fccad82e
|
2015-10-27T14:23:35
|
|
merge: add recursive test with three merge bases
|
|
99d9d9a4
|
2015-10-26T17:44:36
|
|
merge: improve test names in recursive merge tests
|
|
a200bcf7
|
2015-10-26T17:25:42
|
|
merge: add a third-level recursive merge
|
|
cdb6c1c8
|
2015-10-26T17:14:28
|
|
merge: add a second-level recursive merge
|
|
75dee59c
|
2015-10-26T10:37:58
|
|
merge: build virtual base of multiple merge bases
When the commits to merge have multiple common ancestors, build a
"virtual" base tree by merging the common ancestors.
|
|
86c8d02c
|
2015-10-22T20:20:07
|
|
merge: add simple recursive test
Add a simple recursive test - where multiple ancestors exist and
creating a virtual merge base from them would prevent a conflict.
|
|
fa78782f
|
2015-10-22T17:00:09
|
|
merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`
|
|
e0ab1ca0
|
2015-11-24T14:30:41
|
|
Merge pull request #3523 from pks-t/memleak-fixes
Memleak fixes
|
|
41854c7f
|
2015-11-24T15:56:55
|
|
Merge pull request #3520 from ethomson/checkout_nsecs
checkout: only consider nsecs when built that way
|
|
77b79dde
|
2015-11-24T14:36:46
|
|
tests: win32::longpath: free expected_msg
|
|
9031be18
|
2015-11-24T14:38:17
|
|
tests: config::stress: free `git_config` structs
|
|
c8fab201
|
2015-11-24T14:29:32
|
|
tests: config::global: fix memleak in open_programdata
|
|
25e84f95
|
2015-11-23T15:49:54
|
|
checkout: only consider nsecs when built that way
When examining the working directory and determining whether it's
up-to-date, only consider the nanoseconds in the index entry when
built with `GIT_USE_NSEC`. This prevents us from believing that
the working directory is always dirty when the index was originally
written with a git client that uinderstands nsecs (like git 2.x).
|
|
66e4e6da
|
2015-11-21T11:26:18
|
|
Merge pull request #3515 from jacquesg/unsigned-signed
Fix <0 unsigned comparison (stat.st_size should be an off_t)
|
|
e78e8fae
|
2015-11-20T20:22:38
|
|
Make stat.st_size a __int64 not a uint64_t
|
|
c4f60543
|
2015-11-20T17:57:04
|
|
Merge pull request #3517 from jacquesg/warnings-fixes
Fix some warnings
|
|
7a612b53
|
2015-11-20T17:52:00
|
|
Merge pull request #3514 from jacquesg/stat-fixes
Stat fixes
|
|
1f6c891e
|
2015-11-20T15:38:33
|
|
Merge pull request #3516 from libgit2/cmn/repository-state-sequencer
repository: distinguish sequencer cherry-pick and revert
|
|
eb11fac6
|
2015-11-20T18:57:13
|
|
Detect stat's structure
|
|
87428c55
|
2015-11-20T20:48:51
|
|
Fix some warnings
|
|
2ea40fda
|
2015-11-20T13:19:23
|
|
repository: distinguish sequencer cherry-pick and revert
These are not quite like their plain counterparts and require special handling.
|
|
69d14948
|
2015-11-17T13:21:18
|
|
Merge pull request #3511 from ethomson/racy_fixes_2
Racy fixes for writing new indexes
|
|
41744745
|
2015-11-17T13:20:48
|
|
Merge pull request #3512 from ethomson/windows_sysdir
Protect windows SYSDIR when running tests
|
|
88638f9b
|
2015-11-17T11:22:01
|
|
tests: use out-of-the-way config dir in sandbox
Don't put the configuration in a subdir of the sandbox named
`config`, lest some tests decide to create their own directory
called `config`. Prefix with some underscores for uniqueness.
|
|
fe963748
|
2015-11-16T23:34:26
|
|
tests: set PROGRAMDATA directory for running tests
|
|
6f7c4118
|
2015-11-17T08:38:46
|
|
config::global: use PROGRAMDATA configuration
Query the `GIT_CONFIG_LEVEL_PROGRAMDATA` location when setting it up
for tests, in case the test runner has sandboxed it.
|
|
3eac1037
|
2015-11-16T23:31:19
|
|
settings: allow users to set PROGRAMDATA
Allow users to set the `git_libgit2_opts` search path for the
`GIT_CONFIG_LEVEL_PROGRAMDATA`. Convert `GIT_CONFIG_LEVEL_PROGRAMDATA`
to `GIT_SYSDIR_PROGRAMDATA` for setting the configuration.
|
|
5f32c506
|
2015-11-16T18:06:52
|
|
racy: make git_index_read_index handle raciness
Ensure that `git_index_read_index` clears the uptodate bit on
files that it modifies.
Further, do not propagate the cache from an on-disk index into
another on-disk index. Although this should not be done, as
`git_index_read_index` is used to bring an in-memory index into
another index (that may or may not be on-disk), ensure that we do
not accidentally bring in these bits when misused.
|
|
c30051f0
|
2015-11-16T18:05:46
|
|
racy: ensure git_index_read_tree clears uptodate
Ensure that `git_index_read_tree` clears the uptodate bit on files
that it modifies.
|