Ben Straub
5748fdee52
Rev-parse chaining: adding the longest chain
...
in the test repo.
2012-05-11 11:30:46 -07:00
Ben Straub
a51bdbcfa1
Implementing rev-parse's ref@{n} and @{-n} syntaxes.
...
Added some reflags to the test repo to support
unit tests.
2012-05-11 11:30:46 -07:00
Ben Straub
38533d5acf
Implementing rev-parse's "ref~2" syntax.
...
Also extended the test suite to include chaining
operators, e.g. "master^2~3^4".
2012-05-11 11:30:46 -07:00
Ben Straub
7149a6252c
Returning error if dereferencing operation fails.
2012-05-11 11:30:46 -07:00
Ben Straub
387d01b857
Implemented rev-parse "^{type}" syntax.
2012-05-11 11:30:45 -07:00
Ben Straub
9d7bdf7119
Implemented rev-parse's "^{}" syntax.
2012-05-11 11:30:45 -07:00
Ben Straub
f597ea8978
Implemented partial caret syntax for rev-parse.
...
Supported forms:
- "^n"
- "^0"
- "^"
Still missing: all of the "^{…}" variants.
2012-05-11 11:30:45 -07:00
Ben Straub
023c6f69ed
Simpler states and initial structure.
...
New tests for "foo^2" syntax, but they don't pass
yet. Support for chaining these, i.e.
"foo^2~3^{u}~1' is starting to shape up.
2012-05-11 11:30:45 -07:00
Ben Straub
ac250c56c7
First stab at implementation of rev-parse.
...
This version supports refspecs of these kinds:
- Full & partial SHAs
- Output from "git describe"
- "/refs/heads/master" (full ref names)
- "master" (partial ref names)
- "FETCH_HEAD" (named heads)
2012-05-11 11:30:45 -07:00
Vicent Martí
b02bcd97f8
Boom
2012-05-02 16:57:16 -07:00
Vicent Martí
946a6dc4e6
Update test suite
2012-05-02 16:14:30 -07:00
Vicent Martí
40879facad
Merge branch 'new-error-handling' into development
...
Conflicts:
.travis.yml
include/git2/diff.h
src/config_file.c
src/diff.c
src/diff_output.c
src/mwindow.c
src/path.c
tests-clar/clar_helpers.c
tests-clar/object/tree/frompath.c
tests/t00-core.c
tests/t03-objwrite.c
tests/t08-tag.c
tests/t10-refs.c
tests/t12-repo.c
tests/t18-status.c
tests/test_helpers.c
tests/test_main.c
2012-05-02 15:59:02 -07:00
Russell Belfer
26515e73a1
Rename to git_reference_name_to_oid
2012-04-23 10:06:31 -07:00
Russell Belfer
f201d613a8
Add git_reference_lookup_oid and lookup_resolved
...
Adds a new public reference function `git_reference_lookup_oid`
that directly resolved a reference name to an OID without returning
the intermediate `git_reference` object (hence, no free needed).
Internally, this adds a `git_reference_lookup_resolved` function
that combines looking up and resolving a reference. This allows
us to be more efficient with memory reallocation.
The existing `git_reference_lookup` and `git_reference_resolve`
are reimplmented on top of the new utility and a few places in the
code are changed to use one of the two new functions.
2012-04-17 10:44:50 -07:00
Vicent Martí
e1f6f94a92
tests: Remove unused file
2012-04-11 19:17:21 +02:00
Vicent Martí
0a20eee953
Merge pull request #619 from nulltoken/topic/branches
...
Basic branch management API
2012-04-11 03:43:30 -07:00
nulltoken
4615f0f71b
branch: add git_branch_move()
2012-04-10 21:39:06 +02:00
nulltoken
731df57080
Add basic branch management API: git_branch_create(), git_branch_delete(), git_branch_list()
2012-04-10 21:39:03 +02:00
Carlos Martín Nieto
8e8b6b01f5
Clean up valgrind warnings
2012-04-04 13:13:43 +02:00
Vicent Martí
471bb8b120
tests: Cleanup & fix test suite
2012-04-03 04:52:52 +02:00
nulltoken
09719c500c
reference: Fix creation of references with extended ASCII characters in their name
2012-04-01 14:33:32 +02:00
Ben Straub
b173121555
Simple readability fixes.
2012-03-31 20:12:29 -07:00
Ben Straub
20ec426dde
Discovered cl_git_strequal! Mounted a crusade!
2012-03-31 19:47:59 -07:00
Ben Straub
270303ca7a
Moved more assertions inside Clar test helpers.
2012-03-31 15:51:35 -07:00
Ben Straub
8e82600e67
Ref normalization test helpers now doing internal asserts.
2012-03-31 14:14:31 -07:00
Ben Straub
00a48934f1
t10-refs.c ported.
2012-03-30 12:05:42 -07:00
schu
90e6c6203d
tests-clar: fix warning sign-compare
...
Signed-off-by: schu <schu-github@schulog.org>
2012-02-13 12:13:05 +01:00
nulltoken
99abb79d53
repository: ensure that the path to the .git directory ends with a forward slash when opening a repository through a working directory path
...
This fixes an issue which was detected while using one of the libgit2 bindings [0]. The lack of the trailing forward slash led the name of references returned by git_reference_listall() to be prefixed with a forward slash.
[0]: https://github.com/libgit2/libgit2sharp/pull/108
2012-02-03 12:46:50 +01:00
Vicent Martí
3fd1520cd4
Rename the Clay test suite to Clar
...
Clay is the name of a programming language on the makings, and we want
to avoid confusions. Sorry for the huge diff!
2012-01-24 20:35:15 -08:00