|
e2cdc145
|
2015-09-23T17:48:52
|
|
patch: show modes when only the mode has changed
|
|
4ac2d8ac
|
2015-09-23T16:33:02
|
|
patch: quote filenames when necessary
|
|
72806f4c
|
2015-09-23T13:56:48
|
|
patch: don't print some headers on pure renames
|
|
82175084
|
2015-09-23T13:40:12
|
|
Introduce git_patch_options, handle prefixes
Handle prefixes (in terms of number of path components) for patch
parsing.
|
|
d3d95d5a
|
2015-09-23T16:30:48
|
|
git_buf_quote: quote ugly characters
|
|
19e46645
|
2015-09-23T11:07:04
|
|
patch printing: include rename information
|
|
28f70443
|
2015-09-23T10:38:51
|
|
patch_parse: use names from `diff --git` header
When a text file is added or deleted, use the file names from the
`diff --git` header instead of the `---` or `+++` lines. This is
for compatibility with git.
|
|
1462c95a
|
2015-09-23T09:54:25
|
|
patch_parse: set binary flag
We may have parsed binary data, set the `SHOW_BINARY` flag which
indicates that we have actually computed a binary diff.
|
|
bc6a31c9
|
2015-09-22T18:29:14
|
|
patch: when parsing, set nfiles correctly in delta
|
|
d68cb736
|
2015-09-22T18:25:03
|
|
diff: include oid length in deltas
Now that `git_diff_delta` data can be produced by reading patch
file data, which may have an abbreviated oid, allow consumers to
know that the id is abbreviated.
|
|
d536ceac
|
2015-09-23T10:47:34
|
|
patch_parse: don't set new mode when deleted
|
|
b85bd8ce
|
2015-09-16T11:37:03
|
|
patch: use delta's old_file/new_file members
No need to replicate the old_file/new_file members, or plumb them
strangely up.
|
|
804d5fe9
|
2015-09-11T08:37:12
|
|
patch: abstract patches into diff'ed and parsed
Patches can now come from a variety of sources - either internally
generated (from diffing two commits) or as the results of parsing
some external data.
|
|
5d17d726
|
2015-07-09T19:22:28
|
|
patch parsing: parse binary patch files
|
|
b8dc2fdb
|
2015-07-09T18:36:53
|
|
zstream: fail when asked to inflate garbage
When we are provided some input buffer (with a length) to inflate,
and it contains more data than simply the deflated data, fail.
zlib will helpfully tell us when it is done reading (via Z_STREAM_END),
so if there is data leftover in the input buffer, fail lest we
continually try to inflate it.
|
|
5b78dbdb
|
2015-07-09T13:04:10
|
|
git_buf: decode base85 inputs
|
|
e7ec327d
|
2015-09-22T17:56:42
|
|
patch parse: unset path prefix
|
|
3149ff6f
|
2015-06-17T18:13:10
|
|
patch application: apply binary patches
Handle the application of binary patches. Include tests that
produce a binary patch (an in-memory `git_patch` object),
then enusre that the patch applies correctly.
|
|
b88f1713
|
2015-06-17T08:07:34
|
|
zstream: offer inflating, `git_zstream_inflatebuf`
Introduce `git_zstream_inflatebuf` for simple uses.
|
|
1cd65991
|
2015-06-17T07:31:47
|
|
delta: refactor git_delta functions for consistency
Refactor the git_delta functions to have consistent naming and
parameters with the rest of the library.
|
|
6a2d2f8a
|
2015-06-17T06:42:20
|
|
delta: move delta application to delta.c
Move the delta application functions into `delta.c`, next to the
similar delta creation functions. Make the `git__delta_apply`
functions adhere to other naming and parameter style within the
library.
|
|
0004386f
|
2015-06-17T06:03:01
|
|
apply: handle empty patches
When a patch is empty, simply copy the source into the destination.
|
|
d34f6826
|
2014-04-08T17:18:47
|
|
Patch parsing from patch files
|
|
7cb904ba
|
2014-04-01T23:58:59
|
|
Introduce git_apply_patch
The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
|
|
c864b4ab
|
2016-05-12T13:18:07
|
|
Ignore submodules when checking for merge conflicts in the workdir.
|
|
afab1fff
|
2016-02-16T21:02:41
|
|
checkout: handle dirty submodules correctly
Don't generate conflicts when checking out a modified submodule and the
submodule is dirty or modified in the workdir.
|
|
fdf14637
|
2016-05-26T00:58:43
|
|
Merge pull request #3792 from edquist/misc
Fix comment for GIT_FILEMODE_LINK
|
|
a2cb4713
|
2016-05-24T14:30:43
|
|
tree: handle removal of all entries in the updater
When we remove all entries in a tree, we should remove that tree from
its parent rather than include the empty tree.
|
|
53412305
|
2016-05-19T15:29:53
|
|
tree: plug leaks in the tree updater
|
|
6ee08d2c
|
2016-05-19T15:22:02
|
|
tree: use the basename for the entry removal
When we want to remove the file, use the basename as the name of the
entry to remove, instead of the full one, which includes the directories
we've inserted into the stack.
|
|
c8fb2e15
|
2016-05-18T16:00:01
|
|
Fix comment for GIT_FILEMODE_LINK
0120000 is symbolic link, not commit
|
|
9464f9eb
|
2016-05-02T17:36:58
|
|
Introduce a function to create a tree based on a different one
Instead of going through the usual steps of reading a tree recursively
into an index, modifying it and writing it back out as a tree, introduce
a function to perform simple updates more efficiently.
`git_tree_create_updated` avoids reading trees which are not modified
and supports upsert and delete operations. It is not as versatile as
modifying the index, but it makes some common operations much more
efficient.
|
|
c1485330
|
2016-05-09T08:58:44
|
|
Merge pull request #3767 from pks-t/pks/misc-fixes
Misc fixes
|
|
6f02f198
|
2016-05-08T17:48:22
|
|
Merge pull request #3773 from lucasderraugh/patch-1
Fix unused variable 'message' warning
|
|
17a93afa
|
2016-05-06T18:44:37
|
|
Merge pull request #3757 from johnhaley81/jh/fix-create-initial-commit
Fix `git_commit_create` for an initial commit
|
|
2527db87
|
2016-05-05T23:34:23
|
|
Fix unused variable 'message' warning
|
|
225cb880
|
2016-04-26T08:09:04
|
|
Fix `git_commit_create` for an initial commit
When calling `git_commit_create` with an empty array of `parents` and `parent_count == 0`
the call will segfault at https://github.com/libgit2/libgit2/blob/master/src/commit.c#L107
when it's trying to compare `current_id` to a null parent oid.
This just puts in a check to stop that segfault.
|
|
9a363d1b
|
2016-05-03T15:29:50
|
|
rebase: handle no common ancestor for inmemory
|
|
fe3057b4
|
2016-05-03T17:36:09
|
|
diff: simplify code for handling empty dirs
When determining diffs between two iterators we may need to
recurse into an unmatched directory for the "new" iterator when
it is either a prefix to the current item of the "old" iterator
or when untracked/ignored changes are requested by the user and
the directory is untracked/ignored.
When advancing into the directory and no files are found, we will
get back `GIT_ENOTFOUND`. If so, we simply skip the directory,
handling resulting unmatched old items in the next iteration. The
other case of `iterator_advance_into` returning either
`GIT_NOERROR` or any other error but `GIT_ENOTFOUND` will be
handled by the caller, which will now either compare the first
directory entry of the "new" iterator in case of `GIT_ENOERROR`
or abort on other cases.
Improve readability of the code to make the above logic more
clear.
|
|
4d384d6b
|
2016-05-02T13:59:51
|
|
Merge pull request #3759 from libgit2/cmn/faster-header
odb: avoid inflating the full delta to read the header
|
|
153fde5b
|
2016-05-02T16:49:59
|
|
delta-apply: fix sign extension
We compute offsets by executing `off |= (*delta++ << 24)` for
multiple constants, where `off` is of type `size_t` and `delta`
is of type `unsigned char`. The usual arithmetic conversions (see
ISO C89 §3.2.1.5 "Usual arithmetic conversions") kick in here,
causing us to promote both operands to `int` and then extending
the result to an `unsigned long` when OR'ing it with `off`.
The integer promotion to `int` may result in wrong size
calculations for big values.
Fix the issue by making the constants `unsigned long`, causing both
operands to be promoted to `unsigned long`.
|
|
7f407710
|
2016-05-02T16:24:14
|
|
odb_loose: fix undefined behavior when computing size
An object's size is computed by reading the object header's size
field until the most significant bit is not set anymore. To get
the total size, we increase the shift on each iteration and add
the shifted value to the total size.
We read the current value into a variable of type `unsigned
char`, from which we then take all bits except the most
significant bit and shift the result. We will end up with a
maximum shift of 60, but this exceeds the width of the value's
type, resulting in undefined behavior.
Fix the issue by instead reading the values into a variable of
type `unsigned long`, which matches the required width. This is
equivalent to git.git, which uses an `unsigned long` as well.
|
|
7b24c4fd
|
2016-05-02T15:47:54
|
|
checkout: set ignorecase=0 when config lookup fails
When `git_repository__cvar` fails we may end up with a
`ignorecase` value of `-1`. As we subsequently check if
`ignorecase` is non-zero, we may end up reporting that data
should be removed when in fact it should not.
Err on the safer side and set `ignorecase = 0` when
`git_repository__cvar` fails.
|
|
fcd1b786
|
2016-05-02T14:46:14
|
|
merge_file: do not unnecessarily check ours/theirs for NULL
The `merge_file__xdiff` function checks if either `ours` or
`theirs` is `NULL`. The function is to be called with existing
files, though, and in fact already unconditionally dereferences
both pointers.
Remove the unnecessary check to silence warnings.
|
|
a97b769a
|
2016-04-27T12:00:31
|
|
odb: avoid inflating the full delta to read the header
When we read the header, we want to know the size and type of the
object. We're currently inflating the full delta in order to read the
first few bytes. This can mean hundreds of kB needlessly inflated for
large objects.
Instead use a packfile stream to read just enough so we can read the two
varints in the header and avoid inflating most of the delta.
|
|
f80852af
|
2016-05-02T14:30:14
|
|
index: fix memory leak on error case
|
|
5e8ba35d
|
2016-04-29T10:36:01
|
|
Merge pull request #3763 from libgit2/ethomson/signature_from_buffer
Introduce `git_signature_from_buffer`
|
|
1e7fa834
|
2016-04-28T22:32:20
|
|
Merge pull request #3760 from backhub/bug/openssl_read
Fix return value of openssl_read (infinite loop)
|
|
d383c39b
|
2016-04-28T12:47:14
|
|
Introduce `git_signature_from_buffer`
Allow users to construct a signature from the type of signature
lines that actually appear in commits.
|
|
568c5a9f
|
2016-04-27T13:56:16
|
|
Fix style: no braces
|
|
d5592378
|
2016-04-26T11:39:53
|
|
annotated_commit: provide refs and description
Differentiate between the ref_name used to create an annotated_commit
(that can subsequently be used to look up the reference) and the
description that we resolved this with (which _cannot_ be looked up).
The description is used for things like reflogs (and may be a ref name,
and ID something that we revparsed to get here), while the ref name must
actually be a reference name, and is used for things like rebase to
return to the initial branch.
|
|
4734c52a
|
2016-04-26T18:04:03
|
|
Fix return value of openssl_read (infinite loop)
openssl_read should return -1 in case of error.
SSL_read returns values <= 0 in case of error.
A return value of 0 can lead to an infinite loop, so the return value
of ssl_set_error will be returned if SSL_read is not successful (analog
to openssl_write).
|
|
9068704b
|
2016-04-26T11:02:45
|
|
Merge pull request #3749 from arthurschreiber/arthur/add-git-reference-dup
Allow creating copies of `git_reference` objects.
|
|
c30955e0
|
2016-04-26T11:02:05
|
|
Merge pull request #3748 from libgit2/ethomson/rebase_detached
Rebase improvements with IDs
|
|
eb39284b
|
2016-04-25T12:16:05
|
|
tag: ignore extra header fields
While no extra header fields are defined for tags, git accepts them by
ignoring them and continuing the search for the message. There are a few
tags like this in the wild which git parses just fine, so we should do
the same.
|
|
908f24fd
|
2016-04-22T10:34:17
|
|
Allow creating copies of `git_reference` objects.
|
|
1f84caf0
|
2016-04-21T18:16:37
|
|
rebase: correctly finish rebasing detached heads
When rebasing with IDs, we do not return to the `branch`,
we remain in a detached HEAD state.
|
|
badc7283
|
2016-04-21T17:29:19
|
|
rebase: handle detached HEADs in `init`
When `init`ing a rebase from a detached HEAD, be sure to remember
that we were in a detached HEAD state so that we can correctly
`abort` the object that we just created.
|
|
375bb2fe
|
2016-04-21T11:02:31
|
|
transport: cast away constness for free
|
|
e0aed4bd
|
2016-04-21T11:01:09
|
|
stransport: pass proxy opts instead of char*
|
|
db22a91b
|
2016-04-21T10:58:22
|
|
iterator: ignore submodule in has_ended
|
|
1dc44910
|
2016-04-19T19:48:52
|
|
Merge pull request #3110 from libgit2/cmn/proxy-config
Proxy configuration
|
|
d45928cc
|
2016-04-18T16:05:12
|
|
ignore: move star-star matching closer to it use
Instead of threading the state down to the larger loop, let's have the
loop where we detect the double star so each of them are easier to read.
|
|
1c3018eb
|
2016-04-18T13:34:18
|
|
ignore: fix directory limits when searching for star-star
In order to match the star-star, we disable the flag that's looking for
a single path element, but that leads to searching for the pattern in
the middle of elements in the input string.
Mark when we're handing a star-star so we jump over the elements in our
attempt to match the part of the pattern that comes after the star-star.
While here, tighten up the check so we don't allow invalid rules
through.
|
|
0d72f67f
|
2016-03-14T17:36:04
|
|
proxy: don't specify the protocol in the type
We leave this up to the scheme in the url field. The type should only
tell us about whether we want a proxy and whether we want to auto-detect
it.
|
|
bf6f7ad2
|
2015-09-30T17:42:53
|
|
winhttp: correctly detect HTTPS usage
|
|
467e2cb1
|
2015-10-02T10:11:43
|
|
curl: ask for proxy credentials
|
|
b373e9a6
|
2015-09-21T22:38:50
|
|
net: use proxy options struct in the stream config
|
|
22e6aa0d
|
2015-09-23T04:39:05
|
|
proxy: don't require the trailing slash on WinHTTP
The path is not something that you use for proxies, so make use of the
new optionality of the path when extracting URL parts.
|
|
4e017413
|
2015-09-21T21:11:02
|
|
netops: make the path optional in URLs
When we're dealing with proxy addresses, we only want a hostname and
port, and the user would not provide a path, so make it optional so we
can use this same function to parse git as well as proxy URLs.
|
|
b117721d
|
2015-07-29T21:23:56
|
|
proxy: use poxy to test our Windows proxy support
|
|
07bd3e57
|
2015-05-07T12:57:56
|
|
proxy: ask the user for credentials if necessary
|
|
a7bece20
|
2015-05-11T16:35:24
|
|
proxy: introduce a proxy options struct
It is currently unused; it will go into the remote's options.
|
|
77965c68
|
2016-04-11T17:43:07
|
|
refs: provide a more general error message for dwim
If we cannot dwim the input, set the error message to be explicit about
that. Otherwise we leave the error for the last failed lookup, which
can be rather unexpected as it mentions a remote when the user thought
they were trying to look up a branch.
|
|
381caf56
|
2016-04-02T22:19:42
|
|
Merge pull request #3724 from ethomson/submodule_start_supports_silly_slashes
iterator/diff: allow trailing `/` on start/end paths to match submodules
|
|
d47f7e1c
|
2016-04-02T13:03:09
|
|
iterator: support trailing `/` in start for submod
Allow callers to specify a start path with a trailing slash to match
a submodule, instead of just a directory. This is for some legacy
behavior that's sort of dumb, but there it is.
|
|
d364dc8b
|
2016-04-01T14:33:42
|
|
ignore: don't use realpath to canonicalize path
If we're looking for a symlink, realpath will give us the resolved path,
which is not what we're after, but a canonicalized version of the path
the user asked for.
|
|
36fc2557
|
2016-04-01T04:09:50
|
|
Merge pull request #3720 from pks-t/pks/merge-driver-memleaks
merge_driver: fix missing `goto done;`
|
|
83c93a7c
|
2016-04-01T09:37:55
|
|
merge_driver: fix missing `goto done;`
The code initializing the merge driver registry accidentally
forgot a `goto done` in case of an error. Because of this the
next line, which registers the global shutdown callback for the
merge drivers, is only called when an error occured.
Fix this by adding the missing `goto done`. This fixes some
memory leaks when the global state is shut down.
|
|
1cac688d
|
2016-04-01T00:29:51
|
|
Merge pull request #3719 from libgit2/ethomson/submodule_status
WD iterator: properly identify submodules
|
|
4df6ddaa
|
2016-03-31T15:05:34
|
|
iterator: use correct search function
|
|
c4aa5c04
|
2016-03-31T10:43:57
|
|
leaks: call `xdl_free_classifier`
|
|
97054833
|
2016-03-30T17:41:08
|
|
leaks: fix some iterator leaks
|
|
f5c874a4
|
2016-03-29T14:47:31
|
|
Plug a few leaks
|
|
d53cc13e
|
2016-03-31T04:12:46
|
|
Merge pull request #3575 from pmq20/master-13jan16
Remove duplicated calls to git_mwindow_close
|
|
6045afd3
|
2016-03-31T11:32:36
|
|
xdiff/xprepare: fix a memory leak
The xdl_prepare_env() function may initialise an xdlclassifier_t
data structure via xdl_init_classifier(), which allocates memory
to several fields, for example 'rchash', 'rcrecs' and 'ncha'.
If this function later exits due to the failure of xdl_optimize_ctxs(),
then this xdlclassifier_t structure, and the memory allocated to it,
is not cleaned up.
In order to fix the memory leak, insert a call to xdl_free_classifier()
before returning.
This patch was originally written by Ramsay Jones (see commit
87f16258367a3b9a62663b11f898a4a6f3c19d31 in git.git).
|
|
1bce1487
|
2016-03-31T11:30:31
|
|
xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits
Commit 307ab20b3 ("xdiff: PATIENCE/HISTOGRAM are not independent option
bits", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the
flag bits used to represent the diff algorithm requested. In addition,
code which had used explicit manipulation of the flag bits was changed
to use the macros.
However, one example of direct manipulation remains. Update this code to
use the XDF_DIFF_ALG() macro.
This patch was originally written by Ramsay Jones (see commit
5cd6978a9cfef58de061a9525f3678ade479564d in git.git).
|
|
2f0450f4
|
2016-03-29T03:26:43
|
|
Merge pull request #3712 from ethomson/config_duplicate_section
config: don't write duplicate section
|
|
b085ecbe
|
2016-03-28T13:51:21
|
|
Merge pull request #3703 from libgit2/cmn/multivar-set-locked
config: don't special-case multivars that don't exist yet
|
|
e25e1ca1
|
2016-03-28T11:13:51
|
|
config: don't write section header if we're in it
If we hit the EOF while trying to write a new value, it may be that
we're already in the section that we were looking for. If so, do not
write a (duplicate) section header, just write the value.
|
|
7b29be31
|
2016-03-26T05:39:07
|
|
Merge pull request #3691 from ethomson/iterators
Some FANTASTIC iterator refactoring
|
|
d6713ec6
|
2016-03-22T10:30:07
|
|
iterator: comment fixed
|
|
f4777058
|
2016-03-22T10:29:41
|
|
iterator: unused includes removed
|
|
9eb9e5fa
|
2016-03-21T17:19:24
|
|
iterator: cleanups
Remove some unused functions, refactor some ugliness.
|
|
35877463
|
2016-03-21T17:03:00
|
|
iterator: refactor empty iterator to new style
|
|
247e3b43
|
2016-03-21T16:51:45
|
|
iterator: mandate `advance_over`
Since the three iterators implement `advance_over` differently,
mandate it and implement each.
|
|
0ef0b71c
|
2016-03-21T12:54:47
|
|
iterator: refactor index iterator
|
|
ba6f86eb
|
2016-03-18T17:33:46
|
|
Introduce `git_path_common_dirlen`
|
|
82a1aab6
|
2016-03-18T12:59:35
|
|
iterator: move the index into the iterator itself
|
|
d4763c98
|
2016-03-24T06:56:25
|
|
Merge pull request #3574 from chescock/buffer-sideband-pack-data
Buffer sideband packet data
|