Commit Graph

9689 Commits

Author SHA1 Message Date
Etienne Samson
8d2784d570 describe: fix documentation 2016-11-01 17:46:20 +01:00
Edward Thomson
a051ee31f2 Merge pull request #3978 from pks-t/pks/doc-improvements
Small documentation improvements
2016-10-31 16:02:43 +00:00
Patrick Steinhardt
dc98cb28db openssl_stream: fix typo 2016-10-31 13:50:23 +01:00
Patrick Steinhardt
59665db3b3 PROJECTS: consistently quote directories 2016-10-31 13:50:13 +01:00
Patrick Steinhardt
ea9ea6ac4a Documentation: fix small typos 2016-10-31 13:49:52 +01:00
Patrick Steinhardt
e3298a3308 Merge pull request #3973 from pks-t/pks/memleak-fixes
Trivial memory leak fixes in test suite
2016-10-28 12:30:39 +02:00
Patrick Steinhardt
30a876cda6 tests: fetchhead: fix memory leak 2016-10-27 11:29:15 +02:00
Patrick Steinhardt
61ad9bcd38 tests: vector: fix memory leak 2016-10-27 11:26:52 +02:00
Carlos Martín Nieto
67dd314086 Merge pull request #3966 from vivaladav/documentation-fixes
patch: minor documentation fix.
2016-10-16 12:57:29 +02:00
Davide Coppola
6d8ecf087c patch: minor documentation fix.
Fix @return description of git_patch_num_lines_in_hunk.
2016-10-16 00:43:27 +01:00
Patrick Steinhardt
dcd759b829 Merge pull request #3897 from pks-t/pks/squelch-example-warnings
Squelch example warnings, enable CI
2016-10-10 09:25:49 +02:00
Patrick Steinhardt
ec3f5a9c20 script: cibuild: build examples 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
fc29391950 examples: add: fix type casting warning 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
5c2a8361d7 examples: diff: parse correct types for line-diffopts 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
7314da1055 examples: fix warnings in network/fetch.c 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
e2d1b7ecbf examples: general: fix remaining warnings 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
662eee1541 examples: general: convert C99 comments to C90 comments 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
c313e3d986 examples: general: extract function demonstrating OID parsing 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
29d9afc0fb examples: general: extract function demonstrating ODB 2016-10-10 09:04:42 +02:00
Patrick Steinhardt
b009adad35 examples: general: extract function demonstrating commit writing 2016-10-10 09:04:41 +02:00
Patrick Steinhardt
15960454c5 examples: general: extract functions demonstrating object parsing 2016-10-10 09:04:41 +02:00
Patrick Steinhardt
8b93ccdf08 examples: general: extract function demonstrating revwalking 2016-10-10 09:04:41 +02:00
Patrick Steinhardt
c079e3c847 examples: general: extract function demonstrating index walking 2016-10-10 09:04:41 +02:00
Patrick Steinhardt
f9a7973dd9 examples: general: extract function demonstrating reference listings 2016-10-10 09:04:41 +02:00
Patrick Steinhardt
986913f45b examples: general: extract function demonstrating config files 2016-10-10 09:04:41 +02:00
Patrick Steinhardt
176d58bad4 examples: general: use tabs instead of spaces 2016-10-10 09:04:41 +02:00
Edward Thomson
610cff13a3 Merge branch 'pr/3809' 2016-10-09 16:05:48 +01:00
Sim Domingo
dc5cfdbab9 make git_diff_stats_to_buf not show 0 insertions or 0 deletions 2016-10-09 16:03:00 +01:00
Edward Thomson
2468bf0615 Merge pull request #3958 from libgit2/ethomson/settings_docs
docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabled
2016-10-09 15:45:20 +01:00
Edward Thomson
aae8953496 Merge pull request #3956 from pks-t/pks/object-parsing-hardening
Object parsing hardening
2016-10-09 12:51:48 +01:00
Patrick Steinhardt
a719ef5e6d commit: always initialize commit message
When parsing a commit, we will treat all bytes left after parsing
the headers as the commit message. When no bytes are left, we
leave the commit's message uninitialized. While uncommon to have
a commit without message, this is the right behavior as Git
unfortunately allows for empty commit messages.

Given that this scenario is so uncommon, most programs acting on
the commit message will never check if the message is actually
set, which may lead to errors. To work around the error and not
lay the burden of checking for empty commit messages to the
developer, initialize the commit message with an empty string
when no commit message is given.
2016-10-09 13:26:21 +02:00
Edward Thomson
93392cdd91 docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabled
We changed the defaults on strict object creation - it is enabled by
default.  Update the documentation to reflect that.
2016-10-09 11:27:56 +01:00
Carlos Martín Nieto
a7df4a9151 Merge pull request #3955 from arthurschreiber/arthur/fix-regcomp_l-check
Fix the existence check for `regcomp_l`.
2016-10-07 22:36:21 +02:00
Arthur Schreiber
361179786d Fix the existence check for regcomp_l.
`xlocale.h` only defines `regcomp_l` if `regex.h` was included as well.

Also change the test cases to actually test `p_regcomp` works with
a multibyte locale.
2016-10-07 12:47:04 -07:00
Edward Thomson
45dc219f65 Merge pull request #3921 from libgit2/cmn/walk-limit-enough
Improve revision walk preparation logic
2016-10-07 16:01:28 +01:00
Patrick Steinhardt
4974e3a596 tree: validate filename and OID length when parsing object
When parsing tree entries from raw object data, we do not verify
that the tree entry actually has a filename as well as a valid
object ID. Fix this by asserting that the filename length is
non-zero as well as asserting that there are at least
`GIT_OID_RAWSZ` bytes left when parsing the OID.
2016-10-07 09:18:55 +02:00
Carlos Martín Nieto
fedc05c89c revwalk: don't show commits that become uninteresting after being enqueued
When we read from the list which `limit_list()` gives us, we need to check that
the commit is still interesting, as it might have become uninteresting after it
was added to the list.
2016-10-06 18:13:34 +02:00
Carlos Martín Nieto
d11fcf867b Merge pull request #3953 from arthurschreiber/arthur/fix-regcomp-locale-issues
Make sure we use the `C` locale for `regcomp` on macOS.
2016-10-06 14:57:11 +02:00
Arthur Schreiber
ab96ca5572 Make sure we use the C locale for regcomp on macOS. 2016-10-06 13:15:31 +02:00
Carlos Martín Nieto
3cc5ec94f8 rebase: don't ask for time sorting
`git-rebase--merge` does not ask for time sorting, but uses the default. We now
produce the same default time-ordered output as git, so make us of that since
it's not always the same output as our time sorting.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
82d4c0e6b8 revwalk: update the description for the default sorting
It changed from implementation-defined to git's default sorting, as there are
systems (e.g. rebase) which depend on this order. Also specify more explicitly
how you can get git's "date-order".
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
ea1ceb7f55 revwalk: remove a useless enqueueing phase for topological and default sorting
After `limit_list()` we already have the list in time-sorted order, which is
what we want in the "default" case. Enqueueing into the "unsorted" list would
just reverse it, and the topological sort will do its own sorting if it needs
to.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
4aed1b9a69 Add revwalk note to CHANGELOG 2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
9db367bf27 revwalk: get rid of obsolete marking code
We've now moved to code that's closer to git and produces the output
during the preparation phase, so we no longer process the commits as
part of generating the output.

This makes a chunk of code redundant, as we're simply short-circuiting
it by detecting we've processed the commits alrady.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
e93b7e327a revwalk: style change
Change the condition for returning 0 more in line with that we write
elsewhere in the library.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
5e2a29a78c commit_list: fix the date comparison function
This returns the integer-cast truth value comparing the dates. What we
want instead of a (-1, 0, 1) output depending on how they compare.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
48c64362e4 revwalk: port over the topological sorting
After porting over the commit hiding and selection we were still left
with mistmaching output due to the topologial sort.

This ports the topological sorting code to make us match with our
equivalent of `--date-order` and `--topo-order` against the output
from `rev-list`.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
938f8e32ec pqueue: support not having a comparison function
In this case, we simply behave like a vector.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
0bd43371c2 vector, pqueue: add git_vector_reverse and git_pqueue_reverse
This is a convenience function to reverse the contents of a vector and a pqueue
in-place.

The pqueue function is useful in the case where we're treating it as a
LIFO queue.
2016-10-06 11:04:55 +02:00
Carlos Martín Nieto
6708618c10 revwalk: get closer to git
We had some home-grown logic to figure out which objects to show during
the revision walk, but it was rather inefficient, looking over the same
list multiple times to figure out when we had run out of interesting
commits. We now use the lists in a smarter way.

We also introduce the slop mechanism to determine when to stpo
looking. When we run out of interesting objects, we continue preparing
the walk for another 5 rounds in order to make it less likely that we
miss objects in situations with complex graphs.
2016-10-06 11:04:55 +02:00