nulltoken
3cd90893a0
revparse: enhance upstream reflog test coverage
2012-07-07 12:16:11 +02:00
nulltoken
35bed94fd5
revparse: enhance refs/<name> coverage
2012-07-07 12:16:10 +02:00
nulltoken
cab65c2b23
revparse: detect incorrect "refname@{-n}" syntax
2012-07-07 12:16:08 +02:00
nulltoken
1decf88bc1
revparse: slightly improve readability of tests
2012-07-07 12:16:08 +02:00
nulltoken
34922eeeed
revparse: readonly tests don't need a sandboxed repo
2012-07-07 12:16:07 +02:00
nulltoken
d0a920a6fd
refs: deep unfound ref returns ENOTFOUND
2012-07-07 12:15:30 +02:00
nulltoken
75261421ec
refs: add git_reference_has_log()
2012-07-07 12:15:28 +02:00
nulltoken
b6bfd96fdd
refs: fix moving of the reflog when renaming a ref
2012-07-07 12:15:28 +02:00
nulltoken
494ae940a0
revparse: fix parsing of date specifiers
2012-07-02 19:56:41 +02:00
nulltoken
52b938d55a
revparse: unfound reflog entry returns ENOTFOUND
2012-06-29 17:23:18 +02:00
nulltoken
08ac23a5fd
revparse: unfound reflog ref returns ENOTFOUND
2012-06-29 17:23:10 +02:00
nulltoken
4de89ce72a
revparse: unfound partially-named ref returns ENOTFOUND
2012-06-29 17:22:43 +02:00
nulltoken
0e7af9e758
revparse: unfound nth parent returns ENOTFOUND
2012-06-28 19:12:42 +02:00
nulltoken
0d23c62c48
revparse: handle specs with caret and colon
2012-06-28 19:12:41 +02:00
nulltoken
5b68ba7e15
revparse: unfound treepath returns ENOTFOUND
2012-06-28 19:12:40 +02:00
nulltoken
faaa7c517c
revparse: return trees through the "colon" syntax
2012-06-28 19:12:40 +02:00
nulltoken
e28dd29b6e
revparse: replace spaces with tabs
2012-06-28 19:12:39 +02:00
nulltoken
527ed55448
references: introduce git_reference_foreach_glob()
2012-06-22 21:40:24 +02:00
nulltoken
d046945cef
Fix MSVC compilation errors
2012-06-22 16:42:37 +03:00
Michael Schubert
f7292a990c
tests-clar: mark unused variables
2012-06-22 10:13:50 +02:00
nulltoken
d4827081ea
branch: drop git_branch_list()
2012-06-21 18:51:32 +02:00
nulltoken
a8fd805e2f
branch: add git_branch_foreach()
2012-06-21 18:51:27 +02:00
Ben Straub
eb6bc45f6d
Avoid uninitialized variable error.
2012-06-19 21:11:48 -07:00
Ben Straub
2c90145aad
Fix potential segfault in revparse.
2012-06-19 09:25:55 -07:00
Frederick Ros
fa45d25f38
Fix issue #763
2012-06-13 17:35:13 +02:00
Ben Straub
e272efcb20
Tests: wrap 'getenv' and friends for Win32 tests.
2012-06-08 11:24:37 -07:00
Ben Straub
763b838152
Fixing rev-parse-induced Travis errors.
2012-06-07 13:22:50 -07:00
Ben Straub
56a5000d58
Merge branch 'development' into rev-parse
...
Conflicts:
src/util.h
tests-clar/refs/branches/listall.c
2012-06-05 12:52:44 -07:00
Ben Straub
734efe4b8e
Rev-parse: implement ":/foo" syntax.
2012-06-01 14:18:52 -07:00
Ben Straub
2497106f91
Rev-parse: add test with deeper path.
2012-06-01 11:41:54 -07:00
Ben Straub
244d2f6b80
Rev-parse: add "tag:README" syntax.
2012-05-30 16:52:11 -07:00
Vicent Martí
59d91979d8
Merge pull request #710 from libgit2/breaking-changes
...
Break everything before the release
2012-05-18 13:53:38 -07:00
Vicent Martí
904b67e69f
errors: Rename error codes
2012-05-18 01:48:50 +02:00
Vicent Martí
e172cf082e
errors: Rename the generic return codes
2012-05-18 01:26:26 +02:00
Vicent Martí
2e2e97858d
Properly tag all enums
with a _t
2012-05-18 01:26:23 +02:00
Vicent Martí
4fbd1c007e
refs: git_reference_listall -> git_reference_list
2012-05-18 01:26:16 +02:00
nulltoken
392eced6f0
branch: retrieve symbolic references when listing the branches
2012-05-18 00:26:04 +02:00
Vicent Martí
1c3a5a0302
Merge pull request #693 from nulltoken/topic/enhance_branch_move_test_coverage
...
branch: cover with test that moving a non existing branch returns ENOTFOUND
2012-05-14 11:25:55 -07:00
nulltoken
48ce97dd96
branch: cover with test that moving a non existing branch returns ENOTFOUND
2012-05-13 11:03:29 +02:00
nulltoken
341a7136f6
branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist
2012-05-13 10:30:13 +02:00
Ben Straub
7c22e72ba6
Removing test whose results are platform-dependent.
2012-05-11 12:21:58 -07:00
Ben Straub
72b86bae50
Rev-parse: better error handling for chaining.
...
Fixed an error where "nonexistant^N" or similar
would fall into an assert. This now properly returns
an error.
2012-05-11 11:58:02 -07:00
Ben Straub
92ad5a5cda
Rebasing onto libgit2/development: cleanup.
2012-05-11 11:55:20 -07:00
Ben Straub
c8a33547a0
Rev-parse: now capturing and reporting regex errors.
2012-05-11 11:35:50 -07:00
Ben Straub
46c2ead05d
Now properly handling branches with "-g" in their names.
2012-05-11 11:35:50 -07:00
Ben Straub
d13c1a8b60
Fixing broken tests.
2012-05-11 11:35:50 -07:00
Ben Straub
a346992f7e
Rev-parse: @{time} syntax.
...
Ported date.c (for approxidate_careful) from git.git
revision aa39b85. Trimmed out the parts we're not
using.
2012-05-11 11:35:50 -07:00
Ben Straub
886f183ac3
Rev-parse: "ref^{/regex}" syntax.
2012-05-11 11:31:30 -07:00
Ben Straub
a6346302e6
Rev-parse: "ref@{upstream}" syntax.
...
Added tracking configuration to the test repo's
config to support unit tests.
2012-05-11 11:30:47 -07:00
Ben Straub
27ee848397
Rev-parse: plugging (most) memory leaks.
2012-05-11 11:30:46 -07:00
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