Age | Commit message (Collapse) | Author |
|
Make it pair up with the one for commits. This fixes #1691.
|
|
|
|
When enabled, only the first parent of each commit will be queued,
enabling a simple way of using first-parent simplification.
|
|
|
|
The new tests don't always want to use the same fixture data as
the old ones so this makes it configurable on a per-test basis.
|
|
The git_reference_next API silently skips invalid references when
scanning the loose refs. The git_reference_next_name API should
skip the same ones even though it isn't creating the reference
object.
This adds a test with a an invalid loose reference and makes sure
that both APIs skip the same entries and generate the same results.
|
|
|
|
All the hard work is already in revparse.
Signed-off-by: Greg Price <price@mit.edu>
|
|
Signed-off-by: Greg Price <price@mit.edu>
|
|
The purported command output was already inaccurate, as the refs
aren't where it shows. In any event, the labels a reader of this
file really needs are the indices used in commit_sorting_*, to make
it possible to understand them by referring directly from those
arrays to the diagram rather than from the index arrays, to commit_ids,
to the diagram. Add those.
Signed-off-by: Greg Price <price@mit.edu>
|
|
|
|
|
|
Fix an issue with ahead-behind for lopsided traversal
|
|
|
|
Ahead-behind count is still a valid operation, even if the two
commits don't have a common merge-base. The old implementation was
buggy, so it returned ENOTFOUND. Fixed now.
|
|
Fix a typo that caused a failing test, and use cl_assert_equal
instead of cl_assert.
|
|
`revwalk.h:commit_lookup()` -> `git_revwalk__commit_lookup()`
and make `git_commit_list_parse()` do real error checking that
the item in the list is an actual commit object. Also fixed an
apparent typo in a test name.
|
|
Moved it into graph.{c,h} which i created for the new "graph"
functions namespace. Also adjusted the function prototype
to use `size_t` and `const git_oid *`.
|
|
Adds a repo with a more complex topology to test the ahead-behind
count.
|
|
|
|
|
|
Without this change, any failed assertion in the second (or a later) test
inside a test suite has a chance of double deleting memory, resulting in
a heap corruption. See #1096 for details.
This leaves alone the test cases where we "just" use cl_git_sandbox_init()
and cl_git_sandbox_cleanup(). These methods already take good care to not
double delete a repository.
Fixes #1096
|
|
Fixes #921.
|
|
Check the type of the pushed object immediately instead of starting the
walk and failing in between.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Nothing should be hidden and this shouldn't bother the merge base
calculation.
|
|
It's implemented in revwalk.c so it has access to the revision
walker's commit cache and related functions. The algorithm is the one
used by git, modified so it fits better with the library's functions.
|
|
The code was already there, so factor it out and let users push an OID
by giving it a reference name. Only refs to commits are
supported. Annotated tags will throw an error.
|
|
|
|
It's not unusual to want the walker to act on HEAD, so add a
convencience function for the case that the user doesn't already have
a resolved HEAD reference.
|
|
|
|
|