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