Commit Graph

68 Commits

Author SHA1 Message Date
Nikolai Vladimirov
504850cdf5 refs: add git_reference_is_tag 2013-08-26 08:04:10 +03:00
Andrej Mitrovic
0b170f4dcb Fix docs to use proper enum names that exist. 2013-07-01 00:56:54 +02:00
Andreas Linde
e196716457 Fixed most documentation header bugs
Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode.

The following warnings have not been fixed:
common.h:213 - Not sure how the documentation format is for '...'
notes.h:102 - Correct @param name but empty text
notes.h:111 - Correct @param name but empty text
pack.h:140 - @return missing text
pack.h:148 - @return missing text
2013-06-24 15:33:41 +02:00
Vicent Martí
947fad4f7f Merge pull request #1624 from libgit2/vmg/full-ref-iterator
Breaking RefDB changes
2013-06-03 09:28:58 -07:00
Vicent Martí
9afc59710e Merge pull request #1559 from carlosmn/ref-shorthand
Introduce git_reference_shorthand
2013-05-31 03:09:38 -07:00
Vicent Marti
4e6e2ff26f ...Aaaand this works 2013-05-30 03:47:10 +02:00
Vicent Marti
ec24e54296 What are the chances, really 2013-05-29 22:47:37 +02:00
Vicent Marti
56960b8396 Liike this 2013-05-28 20:47:55 +02:00
Ben Straub
e167ec1897 Merge pull request #1597 from zodiac/patch-1
define "long name" in git_reference_name_to_id
2013-05-21 08:09:17 -07:00
Carlos Martín Nieto
fc74343ff4 refs: export the glob iterator 2013-05-21 16:51:50 +02:00
Li Xuanji
e069478edc define "long name" in git_reference_name_to_id 2013-05-21 21:35:58 +08:00
Edward Thomson
b6cc559a78 Merge pull request #1385 from carlosmn/refs-iter
Introduce a refs iterator
2013-05-11 02:42:49 -07:00
Carlos Martín Nieto
2b562c3a1e refs: remove the OID/SYMBOLIC filtering
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.

As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
2013-05-11 11:20:38 +02:00
Carlos Martín Nieto
4def7035ca refs: introduce an iterator
This allows us to get a list of reference names in a loop instead of callbacks.
2013-05-11 11:20:37 +02:00
Carlos Martín Nieto
4f2eb2b7f4 Introduce git_reference_shorthand
Generate a shorthand name out of the full refname.
2013-05-08 02:28:47 +02:00
Carlos Martín Nieto
98d633cccf Expose git_reference_dwim
Extract this function out of the rev-parse code to be able to DWIM a
reference instead of its target.
2013-05-07 23:34:48 +02:00
Carlos Martín Nieto
528a4e24c6 Parse shorthand refspecs as valid
Relax the ONELEVEL ref naming rules so the refspec parsing code can
ask for 'master' to be considered valid.
2013-04-28 14:21:10 +02:00
Vicent Marti
3be933b143 refs: Add git_referene_target_peel 2013-04-17 17:33:51 +02:00
Vicent Marti
33abaad809 refs: Dude, you're OUT. 2013-03-07 18:58:34 +01:00
Edward Thomson
d00d54645d immutable references and a pluggable ref database 2013-03-07 11:01:52 -06:00
Michael Schubert
abeefbbe18 push: properly handle tags
Currently, push doesn't really handle tags when queueing objects. Fix
it.
2013-01-09 17:05:21 +01:00
Jameson Miller
087f64d3e3 Relax refspecs accepted by push 2013-01-09 16:15:58 +01:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Vicent Martí
e05ca13f1f Merge pull request #1115 from ben/struct-versions
Version info for public structs
2012-12-05 11:47:19 -08:00
nulltoken
bc05f30c47 object: refine git_object_peel() error report 2012-12-01 08:34:29 +01:00
nulltoken
80d9d1df14 refs: Deploy EINVALIDSPEC usage 2012-12-01 08:34:26 +01:00
Ben Straub
f4fc9fdba0 Cleanup nitpicky things 2012-11-30 13:12:10 -08:00
Russell Belfer
eecc805029 Update callback fn ptr for git_reference_foreach
As part of API review, use a typedef for the callback fn ptr.
2012-11-27 13:18:28 -08:00
Ben Straub
2508cc66eb Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -08:00
Russell Belfer
b90500f03d Improve docs, examples, warnings
This improves docs in some of the public header files, cleans
up and improves some of the example code, and fixes a couple
of pedantic warnings in places.
2012-11-01 14:08:30 -07:00
Paul Thompson
b46708aaf9 Separated git_strarray from common.h. Added doxy comments. 2012-10-11 23:04:08 +11: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
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
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
nulltoken
e0db9f1117 refs: fix missing parameter documentation 2012-08-15 17:54:05 +02: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
nulltoken
ef4d795ec5 refs: drop git_reference_remote_tracking_from_branch() 2012-07-24 16:09:49 +02:00
nulltoken
88bcd5153f branch: introduce git_reference_is_branch() 2012-07-24 16:09:45 +02:00
nulltoken
84f18e3587 refs: introduce git_reference_remote_tracking_from_branch() 2012-07-12 01:06:13 +02:00
nulltoken
75261421ec refs: add git_reference_has_log() 2012-07-07 12:15:28 +02:00
nulltoken
527ed55448 references: introduce git_reference_foreach_glob() 2012-06-22 21:40:24 +02:00
Bruce Mitchener
d73c94b21c Fix spelling errors. 2012-05-19 20:26:52 +07: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
Russell Belfer
26515e73a1 Rename to git_reference_name_to_oid 2012-04-23 10:06:31 -07:00