nulltoken
3548fcf562
refs: propagate EEXISTS upon renaming
2012-10-11 14:00:26 +02:00
nulltoken
0c78f685eb
branch: introduce git_branch_is_head()
2012-10-07 21:03:51 +02:00
nulltoken
b52b6571af
branch: enhance branch moving test coverage
2012-10-07 21:03:48 +02:00
Carlos Martín Nieto
c128149315
refs: propagate EEXISTS
...
Indicate whether the error comes from the ref already existing or
elsewhere. We always perform the check and this lets the user write
more concise code.
2012-09-30 11:56:37 +02:00
Vicent Martí
31d22037a6
Merge pull request #944 from scunz/list_tags
...
Tags: teach git_tag_list not to include the 'refs/tags/' prefix
2012-09-25 14:52:24 -07:00
nulltoken
77e06d7e85
refs: introduce git_reference_is_valid_name()
2012-09-25 07:49:15 +02:00
nulltoken
c030ada7ff
refs: make git_reference_normalize_name() accept refspec pattern
2012-09-25 07:49:14 +02:00
Sascha Cunz
7604ddbf70
Tests: Add 3 tags to resources/testrepo.
...
Adjusts refs::list test (including the comments)
Adjusts objects::tags::list test
2012-09-23 01:02:07 +02:00
nulltoken
c2948c7754
refs: prevent locked refs from being enumerated
...
Fix #936
2012-09-14 21:56:14 +02:00
nulltoken
e16fc07f7e
refspec: No remote tracking ref from a fetchspec-less remote
2012-09-13 22:31:29 +02:00
nulltoken
316659489a
refs: introduce git_reference_peel()
...
Fix #530
2012-09-06 18:40:05 +02:00
Vicent Marti
62eafd0620
Merge branch 'branch-delete-ref' into development
...
Conflicts:
include/git2/refs.h
2012-08-27 14:54:52 -07:00
Vicent Martí
b9d283d14a
Merge pull request #897 from nulltoken/topic/git_reference_check_format
...
refs: expose git_reference_normalize_name()
2012-08-27 13:39:17 -07:00
nulltoken
2e0c881670
refs: expose git_reference_normalize_name()
2012-08-27 08:41:26 +02:00
Vicent Marti
1c947daa80
branch: Change git_branch_delete
to take a ref
2012-08-26 18:00:10 -07:00
Vicent Martí
8238401ccb
Merge pull request #896 from ben/revparse-ambiguous
...
Revparse: GIT_EAMBIGUOUS
2012-08-25 11:37:23 -07:00
Ben Straub
c9de8611d6
Revparse: GIT_EAMBIGUOUS
...
Revparse now returns EAMBIGUOUS if the the spec
doesn't match any refs/tags, and is <4 characters.
2012-08-25 09:56:20 -07:00
Russell Belfer
e9ca852e4d
Fix warnings and merge issues on Win64
2012-08-23 09:20:17 -07:00
Vicent Martí
f98c32f3fe
Merge pull request #778 from ben/clone
...
Clone
2012-08-19 01:26:06 -07:00
Joshua Peek
e60af90498
Test trailing space after ref oid
2012-08-09 14:39:43 -05:00
Joshua Peek
6ab6829097
Parse ref oids without trailing newline
2012-08-09 12:39:09 -05:00
Vicent Marti
51e1d80846
Merge remote-tracking branch 'arrbee/tree-walk-fixes' into development
...
Conflicts:
src/notes.c
src/transports/git.c
src/transports/http.c
src/transports/local.c
tests-clar/odb/foreach.c
2012-08-06 12:41:08 +02:00
Russell Belfer
5dca201072
Update iterators for consistency across library
...
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:
* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
(i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
the library and `giterr_last()` will return NULL if called.
This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
2012-08-03 17:08:01 -07:00
Ben Straub
32beb2ecfe
Fix testrepo ref count to include new branch.
2012-07-27 20:36:12 -07:00
Ben Straub
a4827a5b5c
Merge remote-tracking branch 'upstream/development' into test-merge
2012-07-27 11:17:21 -07:00
Vicent Marti
f0244463ad
branch: Add repository
argument to create
...
Yes, we can get the repository from the owner of the object, but having
it marked explicitly makes the API more consistent.
2012-07-27 18:49:37 +02:00
Vicent Marti
b41a30bdbb
Merge remote-tracking branch 'nulltoken/topic/branch-rework' into development
2012-07-27 18:45:55 +02:00
Vicent Marti
b84f75c357
reflog: Rename entry_drop
to drop
2012-07-27 18:43:02 +02:00
nulltoken
c3be5c5af0
reflog: keep the reflog name in sync with the reference name
2012-07-25 08:01:13 +02:00
nulltoken
40c75652d0
reflog: prevent git_reflog_append() from persisting the reflog back to disk
2012-07-25 07:53:32 +02:00
nulltoken
bd72425d16
reflog: introduce git_reflog_write()
2012-07-25 07:53:30 +02:00
nulltoken
d284b3de63
reflog: rename git_reflog_write() to git_reflog_append()
2012-07-25 07:53:30 +02:00
nulltoken
59341a5d59
reflog: introduce git_reflog_entry_drop()
2012-07-25 07:53:29 +02:00
nulltoken
7c458e3aee
reflog: add GIT_OID_HEX_ZERO constant
2012-07-25 07:53:27 +02:00
nulltoken
1cb157184b
tests: reorganize reflog tests
2012-07-25 07:53:27 +02:00
nulltoken
ef4d795ec5
refs: drop git_reference_remote_tracking_from_branch()
2012-07-24 16:09:49 +02:00
nulltoken
fb910281d6
branch: introduce git_branch_tracking()
2012-07-24 16:09:48 +02:00
nulltoken
bf9e8cc86b
branch: make git_branch_move() reference based
2012-07-24 16:09:47 +02:00
nulltoken
88bcd5153f
branch: introduce git_reference_is_branch()
2012-07-24 16:09:45 +02:00
nulltoken
eed378b669
branch: introduce git_branch_lookup()
2012-07-24 16:09:44 +02:00
nulltoken
b308c11e4e
branch: change git_branch_create() to make it return a reference
2012-07-24 16:09:43 +02:00
nulltoken
326ca710a0
branch: remove useless header
2012-07-24 16:09:42 +02:00
Carlos Martín Nieto
279b45b05b
revparse: don't allow an empty string
...
Asking the library for "" used to give HEAD, but that's trying to
impose a default at the wrong layer. Make it fail.
2012-07-23 21:32:45 +02:00
Ben Straub
3e026f1b45
Update master-tip to fix unit test.
2012-07-17 09:00:38 -07:00
nulltoken
d448392e5d
revparse: extend test coverage
2012-07-15 18:41:55 +02:00
nulltoken
d1b7921a48
revparse: fix disambiguation of refs and abbrev oids
2012-07-12 22:30:00 +02:00
nulltoken
bb89cf9478
revparse: simplify handling of the colon syntax
2012-07-12 22:29:58 +02:00
Vicent Martí
0cf6b2f29e
Merge pull request #805 from nulltoken/fix/revwalk-email-parsing
...
Fix revwalk email parsing
2012-07-12 09:37:09 -07:00
nulltoken
84f18e3587
refs: introduce git_reference_remote_tracking_from_branch()
2012-07-12 01:06:13 +02:00
nulltoken
874303d468
refs: readonly tests don't need a sandboxed repo
2012-07-12 01:06:12 +02:00
nulltoken
5b07111529
tests: add test commit with angle brackets in the author name
2012-07-11 20:40:12 +02:00
nulltoken
3e82d6c6f0
revparse: unfound reference return ENOTFOUND
2012-07-07 12:16:15 +02:00
nulltoken
ce9e8e11ca
revparse: fix invalid test reference name
2012-07-07 12:16:14 +02:00
nulltoken
b8460c2015
revparse: do not segfault when retrieving the last entry
2012-07-07 12:16:14 +02:00
nulltoken
3d78ab6427
revparse: split reflog test per feature
2012-07-07 12:16:12 +02:00
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