Commit Graph

11 Commits

Author SHA1 Message Date
Kirill A. Shutemov
932d1baf29 cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2011-07-01 18:02:56 +02:00
Vicent Marti
d5afc0390c Remove redundant methods from the API
A bunch of redundant methods have been removed from the external API.

- All the reference/tag creation methods with `_f` are gone. The force
flag is now passed as an argument to the normal create methods.

- All the different commit creation methods are gone; commit creation
now always requires a `git_commit` pointer for parents and a `git_tree`
pointer for tree, to ensure that corrupted commits cannot be generated.

- All the different tag creation methods are gone; tag creation now
always requires a `git_object` pointer to ensure that tags are not
created to inexisting objects.
2011-06-28 19:36:27 +02:00
Vicent Marti
f1d018513a oid: Uniformize ncmp methods
Drop redundant methods. The ncmp method is now public
2011-06-16 02:50:08 +02:00
Vicent Marti
fa48608ec3 oid: Rename methods
Yeah. Finally. Fuck the old names, this ain't POSIX
and they don't make any sense at all.
2011-06-16 02:36:21 +02:00
Scott Chacon
737406b7ab fix gid_ misspelling 2011-06-14 09:31:19 -07:00
Marc Pegon
c09093cce2 Renamed git_oid_match to git_oid_ncmp.
As suggested by carlosmn, git_oid_ncmp would probably
be a better name than git_oid_match, for it does the same
as git_oid_cmp but only up to a certain amount of hex digits.
2011-06-06 17:04:37 +02:00
Marc Pegon
da03c9f35b Changed return value of git_oid_match to be consistent with the other compare methods (0 means oids match). Added method to compare prefixes of hex formatted oids. 2011-06-01 23:40:42 +02:00
Marc Pegon
ac2b94ad76 Added a GIT_OID_MINPREFIXLEN constant to define the minimum length allowed for oid prefixes (set to 4, like in git). Consequently updated some object lookup methods and their documentation. 2011-06-01 23:40:41 +02:00
Marc Pegon
53c0bd81a2 Added error for ambiguous oid prefixes. Added methods to compare the first nth hexadecimal characters (i.e. packets of 4 bits) of OIDs. 2011-06-01 23:40:41 +02:00
Vicent Marti
26022f0719 Add git_oid_shorten (unique OID minimzer)
Set of methods to find the minimal-length to uniquely identify every OID
in a list. Useful for GUI applications, commit logs and so on.

Includes stress test.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-14 23:36:10 +02:00
Vicent Marti
71d33382a7 Move the external includes folder from src to include
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-03 20:23:53 +02:00