Commit Graph

18 Commits

Author SHA1 Message Date
Nikolai Vladimirov
504850cdf5 refs: add git_reference_is_tag 2013-08-26 08:04:10 +03:00
Edward Thomson
d00d54645d immutable references and a pluggable ref database 2013-03-07 11:01:52 -06:00
nulltoken
e4aa7f58fe refs: cover git_reference_name_to_oid() unfound behavior 2012-12-01 08:34:26 +01:00
nulltoken
80d9d1df14 refs: Deploy EINVALIDSPEC usage 2012-12-01 08:34:26 +01:00
Ben Straub
2508cc66eb Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -08:00
Sascha Cunz
9094d30b93 Reset all static variables to NULL in clar's __cleanup
Without this change, any failed assertion in the second (or a later) test
inside a test suite has a chance of double deleting memory, resulting in
a heap corruption. See #1096 for details.

This leaves alone the test cases where we "just" use cl_git_sandbox_init()
and cl_git_sandbox_cleanup(). These methods already take good care to not
double delete a repository.

Fixes #1096
2012-11-23 11:41:56 +01: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
77e06d7e85 refs: introduce git_reference_is_valid_name() 2012-09-25 07:49:15 +02: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
nulltoken
88bcd5153f branch: introduce git_reference_is_branch() 2012-07-24 16:09:45 +02:00
nulltoken
874303d468 refs: readonly tests don't need a sandboxed repo 2012-07-12 01:06:12 +02:00
nulltoken
d0a920a6fd refs: deep unfound ref returns ENOTFOUND 2012-07-07 12:15:30 +02:00
Vicent Martí
946a6dc4e6 Update test suite 2012-05-02 16:14:30 -07:00
Vicent Martí
471bb8b120 tests: Cleanup & fix test suite 2012-04-03 04:52:52 +02:00
Ben Straub
20ec426dde Discovered cl_git_strequal! Mounted a crusade! 2012-03-31 19:47:59 -07:00
Ben Straub
00a48934f1 t10-refs.c ported. 2012-03-30 12:05:42 -07:00