Carlos Martín Nieto
ecdc04287a
Merge pull request #3448 from libgit2/cmn/custom-agent
...
Support setting custom user-agent
2015-11-12 19:20:36 +01:00
Carlos Martín Nieto
027bbaa721
CHANGELOG: add note about custom user-agent
2015-11-12 17:20:30 +01:00
Carlos Martín Nieto
1411cb9eb5
winhttp: use a custom user-agent if the user has set it
...
We also keep the "git/1.0" prefix in order to maintain compatibility
with hosters.
2015-11-12 17:18:42 +01:00
Carlos Martín Nieto
94bac76c3f
http: use a custom user-agent if the user has set it
...
We still prefix it with "git/1.0" since that's required in many
situations, but we replace the area which mentions libgit2.
2015-11-12 17:18:42 +01:00
Carlos Martín Nieto
de870533e0
settings: add a setter for a custom user-agent
2015-11-12 17:18:42 +01:00
Edward Thomson
3f5877d18f
Merge pull request #2534 from libgit2/ntk/case_index_conflicts
...
Failing test for case sensitive conflicts in the index
2015-11-12 10:13:11 -05:00
Edward Thomson
0a700ee368
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.
2015-11-12 09:39:29 -05:00
Edward Thomson
b46c7ee5e2
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.
2015-11-12 09:35:51 -05:00
Carlos Martín Nieto
ad8509ef9f
index: overwrite the path when inserting conflicts
...
When we insert a conflict in a case-insensitive index, accept the
new entry's path as the correct case instead of leaving the path we
already had.
This puts `git_index_conflict_add()` on the same level as
`git_index_add()` in this respect.
2015-11-12 12:11:45 +01:00
Carlos Martín Nieto
16604d7469
index: correctly report which conflict stage has a wrong filemode
...
When we're at offset 'i', we're dealing with the 'i+1' stage, since
conflicts start at 1.
2015-11-12 12:11:45 +01:00
nulltoken
1314af8d63
Failing test for case sensitive conflicts in the index
2015-11-12 12:11:45 +01:00
Carlos Martín Nieto
1c34b717e0
Merge pull request #3498 from ethomson/windows_symlinks
...
Diff: Honor `core.symlinks=false` and fake symlinks
2015-11-08 05:10:18 +01:00
Carlos Martín Nieto
619488948b
Merge pull request #3500 from ethomson/submodules_with_path
...
Handle submodules with paths in `git_submodule_update`
2015-11-08 04:54:55 +01:00
Edward Thomson
f4b0267122
submodule: reload HEAD/index after reading config
...
Reload the HEAD and index data for a submodule after reading the
configuration. The configuration may specify a `path`, so we must
update HEAD and index data with that path in mind.
2015-11-04 16:53:41 -05:00
Edward Thomson
790012ce78
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.
2015-11-04 16:53:41 -05:00
Edward Thomson
5aa28a8f2d
Merge pull request #3465 from libgit2/cmn/tls-register
...
stream: allow registering a user-provided TLS constructor
2015-11-04 14:16:24 -05:00
Edward Thomson
610e553f5b
Merge branch 'pr/3487'
2015-11-03 17:52:21 -05:00
Stjepan Rajko
f5f96a23ee
Fix git_commit_summary to convert newlines to spaces even after
...
whitespace. Collapse spaces around newlines for the summary.
2015-11-03 17:50:55 -05:00
Edward Thomson
ec50b23acc
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.
2015-11-03 17:16:51 -05:00
Edward Thomson
2d556f3166
reflog: test reflog is deleted when ref is deleted
2015-11-03 14:48:31 -05:00
Edward Thomson
6cc5023bfd
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.)
2015-11-03 12:07:03 -05:00
Edward Thomson
6b0fc6abc1
diff: on win32, treat fake "symlinks" specially
...
On platforms that lack `core.symlinks`, we should not go looking for
symbolic links and `p_readlink` their target. Instead, we should
examine the file's contents.
2015-11-03 12:06:49 -05:00
Edward Thomson
f20480ab0c
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).
2015-11-03 12:06:43 -05:00
Carlos Martín Nieto
3ce6cd4bdc
Merge pull request #3494 from leoyanggit/fix_unit_test_build
...
Fix build for unit test
2015-11-03 08:13:41 -08:00
Carlos Martín Nieto
7fafde6325
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.
2015-11-03 08:10:29 -08:00
Carlos Martín Nieto
d39f643a0a
stream: accept NULL in the free function
2015-11-03 08:10:14 -08:00
Edward Thomson
d07c9f4d2a
Merge branch 'pr/3147'
2015-11-02 16:36:28 -05:00
Jason Haslam
3138ad9366
Add diff progress callback.
2015-11-02 16:33:58 -05:00
Leo Yang
505e4531b7
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.
2015-11-02 16:19:25 -05:00
Edward Thomson
db1edf91e9
Merge pull request #3491 from libgit2/cmn/config-checksum
...
Use checksums to detect config file changes
2015-11-02 15:09:19 -05:00
Edward Thomson
76319fa8c6
Merge pull request #3495 from leoyanggit/fix_transport_build
...
Fix build for custom transport users
2015-11-02 15:04:26 -05:00
Vicent Marti
1318ec91a1
Merge pull request #3492 from libgit2/vmg/redundant
...
merge-base: Remove redundant merge bases
2015-11-02 14:27:10 +01:00
Vicent Marti
b656e5eb4f
merge: Fix memory leak in test
2015-11-02 13:47:04 +01:00
Vicent Marti
85196232e8
Add test case
2015-11-02 13:47:04 +01:00
Vicent Marti
1d0bed9de1
merge-base: Style
2015-11-02 13:47:04 +01:00
Vicent Marti
4cacf5b594
merge-base: Do not read parents from the root
2015-11-02 13:47:04 +01:00
Vicent Marti
136a71f4ee
merge-base: Remove redundant merge bases
2015-11-02 13:47:04 +01:00
Carlos Martín Nieto
3547b122b5
filebuf: use an internal buffer
...
This reduces the chances of a crash in the thread tests. This shouldn't
affect general usage too much, since the main usage of these functions
are to read into an empty buffer.
2015-10-30 21:36:51 +01:00
Carlos Martín Nieto
eb5977991a
filebuf: use a checksum to detect file changes
...
Instead of relying on the size and timestamp, which can hide changes
performed in the same second, hash the file content's when we care about
detecting changes.
2015-10-30 19:49:35 +01:00
Carlos Martín Nieto
a2f96479ab
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.
2015-10-30 19:49:34 +01:00
Carlos Martín Nieto
d571a54e60
Merge pull request #3493 from ethomson/read_index
...
index: read_index must update hashes
2015-10-30 19:36:16 +01:00
Leo Yang
bf28da4718
Fix build for custom transport users
...
We should explicitly include the declaration of git_strarray
from "include/git2/sys/transport.h"
2015-10-30 14:17:11 -04:00
Carlos Martín Nieto
e0be1d605f
git: put NULL check at the top
2015-10-30 18:23:17 +01:00
Edward Thomson
0bf77e3283
index: read_index must update hashes
2015-10-30 13:07:51 -04:00
Carlos Martín Nieto
45d295e08c
git: accept NULL as argument to its stream free
2015-10-30 17:51:50 +01:00
Carlos Martín Nieto
fd74bd0842
Merge pull request #3486 from srajko/reflog-segfault-fix
...
Fix segfault when reading reflog with extra newlines
2015-10-29 20:37:48 +01:00
Stjepan Rajko
335c9e2f45
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
2015-10-29 11:15:37 -07:00
Edward Thomson
1b4449b40d
pool: fix documentation
2015-10-28 10:53:03 -04:00
Vicent Marti
232a7e3205
Merge pull request #3488 from libgit2/vmg/pool
...
pool: Simplify implementation
2015-10-28 15:34:16 +01:00
Vicent Marti
d845abe639
merge: Do not mallocz unecessary entries
2015-10-28 14:49:28 +01:00