nulltoken
b1a3a70ed1
repository: Refine repository_head() error report
2012-11-12 00:14:51 +01:00
nulltoken
1f87fa3595
reflog: fix bogus removal of reflog entries
2012-10-26 21:02:01 +02:00
nulltoken
383f164a09
branch: rename config section upon moving
2012-10-25 17:42:31 +02:00
nulltoken
0b98a8a424
branch: remove config section upon deletion
2012-10-25 17:42:31 +02:00
nulltoken
cd1ef82253
test: extract make_head_orphaned() logic
2012-10-20 12:07:53 +02:00
nulltoken
209e34fa70
tests: leverage git_repository_detach_head()
2012-10-20 12:01:04 +02:00
nulltoken
8b05bea870
errors: deploy GIT_EORPHANEDHEAD usage
2012-10-19 22:01:53 +02:00
nulltoken
0532e7bb87
branch: allow deletion of branch when HEAD's missing
2012-10-19 21:23:22 +02:00
nulltoken
2df37f42c1
refs: cover more refname validity edge cases
2012-10-18 23:59:22 +02:00
nulltoken
5912d74c69
revparse: properly handle refnames containing a @
...
Fix #994
2012-10-18 23:05:33 +02:00
Carlos Martín Nieto
7ae5ab5696
Fix leak in the tests
...
Also introduce the slective ref trimming promised but also missed in
the previous commit.
2012-10-15 16:35:10 +02:00
Carlos Martín Nieto
47f44b6ee4
refs: loosen the OID parsing
...
We used to require loose references to contain only an OID (possibly
after trimming the string). This is however not enough for letting us
lookup FETCH_HEAD, which can have a lot of content after the initial
OID.
Change the parsing rules so that a loose refernce must e at least 40
bytes long and the 41st (if it's there) must be accepted by
isspace(3). This makes the trim unnecessary, so only do it for
symrefs. This fixes #977 .
2012-10-15 14:00:19 +02:00
nulltoken
6251de1d17
branches: cover EEXISTS propagation upon moving
2012-10-11 14:09:27 +02:00
nulltoken
62993b6158
branches: propagate EEXISTS upon creation
2012-10-11 14:08:32 +02:00
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