nulltoken
c1b5e8c42b
branch: Make git_branch_remote_name() cope with orphaned heads
2013-02-22 17:04:23 +01:00
nulltoken
2bca5b679b
remote: Introduce git_remote_is_valid_name()
...
Fix libgit2/libgit2sharp#318
2013-02-11 23:19:41 +01:00
nulltoken
4d811c3b77
refs: No component of a refname can end with '.lock'
2013-02-11 23:19:40 +01:00
Russell Belfer
390a3c8141
Merge pull request #1190 from nulltoken/topic/reset-paths
...
reset: Allow the selective reset of pathspecs
2013-02-11 11:44:00 -08:00
Philip Kelley
e026cfee00
Merge pull request #1323 from jamill/resolve_remote
...
Resolve a remote branch's remote
2013-02-11 09:12:39 -08:00
Jameson Miller
2e3e8c889b
Teach remote branch to return its remote
2013-02-11 11:36:22 -05:00
Scott J. Goldman
6ce61a0bf6
tests: fix whitespace in refs/rename.c
2013-02-08 14:25:41 -08:00
nulltoken
3ad052218c
Fix MSVC compilation warnings
...
Fix #1308
2013-02-05 20:33:27 +01:00
nulltoken
0e8e5a6189
revparse: Lookup sha before branch
2013-02-03 11:44:26 +01:00
nulltoken
545b479a07
revparse: Lookup branch before described tag
...
Fix #1306
2013-02-03 11:18:24 +01:00
Carlos Martín Nieto
e5ef0f1814
refs: handle ALLOW_ONELEVEL normalization with leading slash
...
A leading slash confuses the name normalization code when the flags
include ALLOW_ONELEVEL. Catch this case in particular to avoid
triggering an assertion in the uppercase check which expects us not to
pass it an empty string.
The existing tests don't catch this as they simply use the NORMAL
flag.
This fixes #1300 .
2013-01-31 20:23:30 +01:00
Sebastian Bauer
a7f8065f8c
Use cl_assert_equal_s() instead of strcmp().
...
Replaced all cl_assert(!strcmp()) or semantically equivalent forms
by cl_assert_equal_s().
2013-01-25 06:55:56 +01:00
Sebastian Bauer
c253056d24
Added git_branch_name().
...
This is a convenience function to get the branch name of a given
ref. The returned branch name is compatible with the name that can
be supplied e.g. to git_branch_lookup(). That is, the prefixes
"refs/heads" or "refs/remotes" are omitted.
Also added a new test for testing the new function.
2013-01-25 05:24:21 +01:00
Scott J. Goldman
5c7b77c4f8
Seperate out a new test that verifies packed-refs with no trailing newline
...
as per @vmg's request
2013-01-22 16:01:03 -08:00
nulltoken
bf031581d3
branch: Introduce git_branch_tracking_name()
2013-01-16 22:56:13 +01:00
Martin Woodward
ba1a430a8b
Add jGit license block to derrived tests
...
Add the jGit license block to tests derrived from jGit as per the
terms of the BSD license.
2013-01-04 17:29:45 +00:00
Ben Straub
72629a10e3
Clean up GCC build warnings
2012-12-10 10:05:31 -08: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
cc1466264a
revparse: Deploy EINVALIDSPEC usage
2012-12-01 08:34:31 +01:00
nulltoken
84166facc9
revparse: remove timezone setup in tests
2012-12-01 08:34:30 +01:00
nulltoken
bc05f30c47
object: refine git_object_peel() error report
2012-12-01 08:34:29 +01:00
nulltoken
621730383a
branch: Deploy EINVALIDSPEC usage
2012-12-01 08:34:28 +01:00
nulltoken
80212ecb1c
reflog: Deploy EINVALIDSPEC usage
2012-12-01 08:34:27 +01: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
nulltoken
47261d9c8a
tests: drop unused variables
2012-12-01 08:34:25 +01:00
nulltoken
3da73c40fc
Fix compilation warnings
2012-12-01 08:34:21 +01:00
Ben Straub
f4fc9fdba0
Cleanup nitpicky things
2012-11-30 13:12:10 -08:00
nulltoken
37849a8ec3
tracking: fix retrieval of the tracking ref of branch with empty merge and/or remote entry
2012-11-28 20:00:07 +01:00
nulltoken
f1bd50d61d
tracking: remove code duplication in test
2012-11-28 20:00:06 +01:00
Ben Straub
cb7ac81c4d
Fix warning
2012-11-27 13:30:04 -08:00
Russell Belfer
a8122b5d4a
Fix warnings on Win64 build
2012-11-27 13:18:29 -08:00
Vicent Marti
cfbe4be3fb
More external API cleanup
...
Conflicts:
src/branch.c
tests-clar/refs/branches/create.c
2012-11-27 13:18:27 -08: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
nulltoken
b15df1d937
reflog: make entry_byindex() and drop() git compliant
...
Passing 0 as the index now retrieves the most recent entry instead
of the oldest one.
2012-11-17 18:30:35 -08:00
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