|
5663d4f6
|
2016-02-18T12:31:56
|
|
Merge pull request #3613 from ethomson/fixups
Remove most of the silly warnings
|
|
594a5d12
|
2016-02-18T12:28:06
|
|
Merge pull request #3619 from ethomson/win32_forbidden
win32: allow us to read indexes with forbidden paths on win32
|
|
318b825e
|
2016-02-16T17:11:46
|
|
index: allow read of index w/ illegal entries
Allow `git_index_read` to handle reading existing indexes with
illegal entries. Allow the low-level `git_index_add` to add
properly formed `git_index_entry`s even if they contain paths
that would be illegal for the current filesystem (eg, `AUX`).
Continue to disallow `git_index_add_bypath` from adding entries
that are illegal universally illegal (eg, `.git`, `foo/../bar`).
|
|
4be2aa57
|
2016-02-16T18:50:08
|
|
win32: tests around handling forbidden paths
Introduce a repository that contains some paths that were illegal
on PC-DOS circa 1981 (like `aux`, `con`, `com1`) and that in a
bizarre fit of retrocomputing, remain illegal on some "modern"
computers, despite being "new technology".
Introduce some aspirational tests that suggest that we should be
able to cope with trees and indexes that contain paths that
would be illegal on the filesystem, so that we can at least diff
them. Further ensure that checkout will not write a repository
with forbidden paths.
|
|
eadd0f05
|
2016-02-16T14:06:48
|
|
commit: expose the different kinds of errors
We should be checking whether the object we're looking up is a commit,
and we should let the caller know whether the not-found return code
comes from a bad object type or just a missing signature.
|
|
0d9a39ea
|
2016-02-12T10:02:18
|
|
win32: drop incorrect `const`ness
|
|
f28bae0c
|
2016-02-15T17:16:00
|
|
rebase: persist a single in-memory index
When performing an in-memory rebase, keep a single index for the
duration, so that callers have the expected index lifecycle and
do not hold on to an index that is free'd out from under them.
|
|
35439f59
|
2016-02-11T12:24:21
|
|
win32: introduce p_timeval that isn't stupid
Windows defines `timeval` with `long`, which we cannot
sanely cope with. Instead, use a custom timeval struct.
|
|
5a296ad0
|
2016-02-12T00:55:20
|
|
Merge pull request #3610 from ethomson/rebase_bare
rebase: introduce bare rebasing
|
|
3679ebae
|
2016-02-11T23:37:52
|
|
Horrible fix for #3173.
|
|
460ae11f
|
2016-02-11T22:19:20
|
|
commit: don't forget the last header field
When we moved the logic to handle the first one, wrong loop logic was
kept in place which meant we still finished early. But we now notice it
because we're not reading past the last LF we find.
This was not noticed before as the last field in the tested commit was
multi-line which does not trigger the early break.
|
|
263e674e
|
2016-02-11T11:41:23
|
|
merge tests: correct casts
|
|
ad8aa112
|
2016-02-11T11:26:42
|
|
reset test: fix initialization warning
|
|
a202e0d4
|
2016-02-11T10:11:21
|
|
rebase: allow custom merge_options
Allow callers of rebase to specify custom merge options. This may
allow custom conflict resolution, or failing fast when conflicts
are detected.
|
|
ee667307
|
2016-02-11T10:48:48
|
|
rebase: introduce inmemory rebasing
Introduce the ability to rebase in-memory or in a bare repository.
When `rebase_options.inmemory` is specified, the resultant `git_rebase`
session will not be persisted to disk. Callers may still analyze
the rebase operations, resolve any conflicts against the in-memory
index and create the commits. Neither `HEAD` nor the working
directory will be updated during this process.
|
|
488e2b85
|
2016-02-09T16:26:58
|
|
Merge pull request #3599 from libgit2/gpgsign
Introduce git_commit_extract_signature
|
|
a65afb75
|
2016-02-08T18:51:13
|
|
Introduce git_commit_extract_signature
This returns the GPG signature for a commit and its contents without the
signature block, allowing for the verification of the commit's
signature.
|
|
f55eca16
|
2016-02-09T07:17:26
|
|
commit: also match the first header field when searching
We were searching only past the first header field, which meant we were
unable to find e.g. `tree` which is the first field.
While here, make sure to set an error message in case we cannot find the
field.
|
|
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.
|
|
91f0d186
|
2015-12-21T20:49:14
|
|
typos in comments
|
|
5951445f
|
2015-12-17T10:13:04
|
|
commit: Fix memory leak in test suite
|
|
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
|
|
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.
|
|
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>
|
|
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`.
|
|
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.
|
|
a7bd157e
|
2015-11-30T17:40:49
|
|
tests: fix warning for nested struct initialization
|
|
a27f31d8
|
2015-11-30T04:49:31
|
|
Merge pull request #3513 from ethomson/merge_recursive
Recursive Merge
|
|
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
|
|
b1eef912
|
2015-10-27T18:00:30
|
|
merge: add recursive test with conflicting contents
|
|
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
|
|
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`
|
|
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
|
|
c4f60543
|
2015-11-20T17:57:04
|
|
Merge pull request #3517 from jacquesg/warnings-fixes
Fix some warnings
|
|
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
|
|
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.
|
|
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.
|
|
956f4da8
|
2015-11-13T16:30:39
|
|
index: test for smudged entries on write only
Test that entries are only smudged when we write the index: the
entry smudging is to prevent us from updating an index in a way
that it would be impossible to tell that an item was racy.
Consider when we load an index: any entries that have the same
(or newer) timestamp than the index itself are considered racy,
and are subject to further scrutiny.
If we *save* that index with the same entries that we loaded,
then the index would now have a newer timestamp than the entries,
and they would no longer be given that additional scrutiny, failing
our racy detection! So test that we smudge those entries only on
writing the new index, but that we can detect them (in diff) without
having to write.
|
|
de999f26
|
2015-11-13T15:36:45
|
|
checkout::crlf test: don't crash when no idx entry
When there's no matching index entry (for whatever reason), don't
try to dereference the null return value to get at the id.
Otherwise when we break something in the index API, the checkout
test crashes for confusing reasons and causes us to step through
it in a debugger thinking that we had broken much more than we
actually did.
|
|
d1101263
|
2015-11-13T15:32:48
|
|
index: don't detect raciness in uptodate entries
Keep track of entries that we believe are up-to-date, because we
added the index entries since the index was loaded. This prevents
us from unnecessarily examining files that we wrote during the
cleanup of racy entries (when we smudge racily clean files that have
a timestamp newer than or equal to the index's timestamp when we
read it). Without keeping track of this, we would examine every
file that we just checked out for raciness, since all their timestamps
would be newer than the index's timestamp.
|
|
7ff7ca62
|
2015-11-12T20:51:01
|
|
pool: Never return unaligned buffers
|
|
75a0ccf5
|
2015-11-12T19:53:09
|
|
Merge pull request #3170 from CmdrMoozy/nsec_fix
git_index_entry__init_from_stat: set nsec fields in entry stats
|
|
2c26c867
|
2015-11-12T19:22:31
|
|
Merge pull request #3499 from ethomson/ref_dir_errmsgs
Improve error messages when dirs prevent ref/reflog creation
|
|
ecdc0428
|
2015-11-12T19:20:36
|
|
Merge pull request #3448 from libgit2/cmn/custom-agent
Support setting custom user-agent
|
|
de870533
|
2015-10-02T03:43:11
|
|
settings: add a setter for a custom user-agent
|
|
0a700ee3
|
2015-11-03T17:34:54
|
|
reflog: error when a directory is at reflog path
When a non-empty directory exists and prevents the creation of a
reflog, provide a more informative error message.
|
|
b46c7ee5
|
2015-11-03T17:18:00
|
|
refs: complain when a directory exists at ref
When a (non-empty) directory exists at the reference target
location, complain with a more actionable error message.
|
|
1314af8d
|
2014-08-26T13:51:37
|
|
Failing test for case sensitive conflicts in the index
|
|
1c34b717
|
2015-11-08T05:10:18
|
|
Merge pull request #3498 from ethomson/windows_symlinks
Diff: Honor `core.symlinks=false` and fake symlinks
|
|
61948894
|
2015-11-08T04:54:55
|
|
Merge pull request #3500 from ethomson/submodules_with_path
Handle submodules with paths in `git_submodule_update`
|
|
790012ce
|
2015-11-04T16:16:51
|
|
submodule: test updating a submodule w/ a path
Test that `git_submodule_update` can handle a submodule that is
freshly cloned and has a path differing from its name.
|
|
5aa28a8f
|
2015-11-04T14:16:24
|
|
Merge pull request #3465 from libgit2/cmn/tls-register
stream: allow registering a user-provided TLS constructor
|
|
f5f96a23
|
2015-10-09T10:41:06
|
|
Fix git_commit_summary to convert newlines to spaces even after
whitespace. Collapse spaces around newlines for the summary.
|
|
ec50b23a
|
2015-11-03T17:02:07
|
|
filebuf: detect directories in our way
When creating a filebuf, detect a directory that exists in our
target file location. This prevents a failure later, when we try
to move the lock file to the destination.
|
|
2d556f31
|
2015-11-03T14:48:31
|
|
reflog: test reflog is deleted when ref is deleted
|
|
6cc5023b
|
2015-11-03T11:27:31
|
|
index: test that add_bypath preserves symlinks
Test that on platforms without `core.symlinks`, we preserve symlinks
in `git_index_add_bypath`. (Users should correct the actual index
entry's mode to change a link to a regular file.)
|
|
f20480ab
|
2015-11-03T09:40:30
|
|
diff: test "symlinks" in wd are respected on win32
When `core.symlinks = false`, we write the symlinks content (target)
to a regular file. We should ensure that when we later see that
regular file, we treat it specially - and that changing that regular
file would actually change the symlink target. (For compatibility
with Git for Windows).
|
|
3ce6cd4b
|
2015-11-03T08:13:41
|
|
Merge pull request #3494 from leoyanggit/fix_unit_test_build
Fix build for unit test
|
|
7fafde63
|
2015-10-13T11:25:41
|
|
stream: allow registering a user-provided TLS constructor
This allows the application to use their own TLS stream, regardless of
the capabilities of libgit2 itself.
|
|
3138ad93
|
2015-07-16T10:17:16
|
|
Add diff progress callback.
|
|
505e4531
|
2015-10-30T13:53:53
|
|
Fix build for unit test
If none of GIT_OPENSSL, GIT_WINHTTP or GIT_SECURE_TRANSPORT
is defined we should also be able to build the unit test.
|
|
db1edf91
|
2015-11-02T15:09:19
|
|
Merge pull request #3491 from libgit2/cmn/config-checksum
Use checksums to detect config file changes
|
|
b656e5eb
|
2015-11-02T12:06:50
|
|
merge: Fix memory leak in test
|
|
85196232
|
2015-10-30T18:32:34
|
|
Add test case
|
|
a2f96479
|
2015-10-29T20:31:25
|
|
config: add failing test for an external modification
We currently use the timestamp in order to decide whether a config file
has changed since we last read it.
This scheme falls down if the file is written twice within the same
second, as we fail to detect the file change after the first read in
that second.
|
|
fd74bd08
|
2015-10-29T20:37:48
|
|
Merge pull request #3486 from srajko/reflog-segfault-fix
Fix segfault when reading reflog with extra newlines
|
|
335c9e2f
|
2015-10-26T15:33:00
|
|
Prevent segfault when parsing a reflog with oid parse error
Using calloc instead of malloc because the parse error will lead to an immediate free of committer (and its properties, which can segfault on free if undefined - test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_returns_error segfaulted before the fix).
#3458
|
|
66eb7660
|
2015-10-28T10:29:00
|
|
pool: Handle 32 bit systems
|
|
1e5e02b4
|
2015-10-27T17:26:04
|
|
pool: Simplify implementation
|
|
8683d31f
|
2015-10-22T14:39:20
|
|
merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT
Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which
will stop on the first conflict and fail the merge operation with
GIT_EMERGECONFLICT.
|
|
dc2cf3eb
|
2015-10-22T18:35:43
|
|
Merge pull request #3480 from ethomson/nsecs
Nanoseconds in the index: ignore for diffing
|
|
99a09f7f
|
2015-10-22T09:29:40
|
|
index: test that we round-trip nsecs
Test that nanoseconds are round-tripped correctly when we read
an index file that contains them. We should, however, ignore them
because we don't understand them, and any new entries in the index
should contain a `0` nsecs field, while existing preserving entries.
|
|
44b1e3e3
|
2015-10-21T13:43:22
|
|
Merge pull request #3475 from libgit2/cmn/programdata-config
config: add a ProgramData level
|
|
8c7c5fa5
|
2015-10-20T17:42:42
|
|
config: add a ProgramData level
This is where portable git stores the global configuration which we can
use to adhere to it even though git isn't quite installed on the system.
|
|
bbe1957b
|
2015-10-21T12:09:29
|
|
tests: Fix warnings
|
|
307c4a2b
|
2015-10-21T11:58:44
|
|
signature: Strip crud just like Git does
|
|
4280fabb
|
2015-10-15T07:10:48
|
|
Merge pull request #3466 from libgit2/cmn/quick-parse-64
revwalk: make commit list use 64 bits for time
|
|
8321596a
|
2015-10-15T12:22:10
|
|
Merge pull request #3444 from ethomson/add_preserves_conflict_mode
Preserve modes from a conflict in `git_index_insert`
|
|
a0a1b19a
|
2015-10-14T19:31:54
|
|
odb: Prioritize alternate backends
For most real use cases, repositories with alternates use them as main
object storage. Checking the alternate for objects before the main
repository should result in measurable speedups.
Because of this, we're changing the sorting algorithm to prioritize
alternates *in cases where two backends have the same priority*. This
means that the pack backend for the alternate will be checked before the
pack backend for the main repository *but* both of them will be checked
before any loose backends.
|
|
5ffdea6f
|
2015-10-14T16:49:01
|
|
revwalk: make commit list use 64 bits for time
We moved the "main" parsing to use 64 bits for the timestamp, but the
quick parsing for the revwalk did not. This means that for large
timestamps we fail to parse the time and thus the walk.
Move this parser to use 64 bits as well.
|
|
6c014bcc
|
2015-09-29T12:18:17
|
|
diff: don't feed large files to xdiff
|