nulltoken
c1b5e8c42b
branch: Make git_branch_remote_name() cope with orphaned heads
2013-02-22 17:04:23 +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
Jameson Miller
2e3e8c889b
Teach remote branch to return its remote
2013-02-11 11:36:22 -05:00
nulltoken
3ad052218c
Fix MSVC compilation warnings
...
Fix #1308
2013-02-05 20:33:27 +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
nulltoken
bf031581d3
branch: Introduce git_branch_tracking_name()
2013-01-16 22:56:13 +01: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
621730383a
branch: Deploy EINVALIDSPEC usage
2012-12-01 08:34:28 +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
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
b1a3a70ed1
repository: Refine repository_head() error report
2012-11-12 00:14:51 +01: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
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
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
nulltoken
e16fc07f7e
refspec: No remote tracking ref from a fetchspec-less remote
2012-09-13 22:31:29 +02:00
Vicent Marti
1c947daa80
branch: Change git_branch_delete
to take a ref
2012-08-26 18:00:10 -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
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
nulltoken
fb910281d6
branch: introduce git_branch_tracking()
2012-07-24 16:09:48 +02:00
nulltoken
bf9e8cc86b
branch: make git_branch_move() reference based
2012-07-24 16:09:47 +02:00
nulltoken
eed378b669
branch: introduce git_branch_lookup()
2012-07-24 16:09:44 +02:00
nulltoken
b308c11e4e
branch: change git_branch_create() to make it return a reference
2012-07-24 16:09:43 +02:00
nulltoken
326ca710a0
branch: remove useless header
2012-07-24 16:09:42 +02:00
nulltoken
5b07111529
tests: add test commit with angle brackets in the author name
2012-07-11 20:40:12 +02:00
nulltoken
d046945cef
Fix MSVC compilation errors
2012-06-22 16:42:37 +03:00
Michael Schubert
f7292a990c
tests-clar: mark unused variables
2012-06-22 10:13:50 +02:00
nulltoken
d4827081ea
branch: drop git_branch_list()
2012-06-21 18:51:32 +02:00
nulltoken
a8fd805e2f
branch: add git_branch_foreach()
2012-06-21 18:51:27 +02:00
Frederick Ros
fa45d25f38
Fix issue #763
2012-06-13 17:35:13 +02:00
Ben Straub
763b838152
Fixing rev-parse-induced Travis errors.
2012-06-07 13:22:50 -07:00
Ben Straub
56a5000d58
Merge branch 'development' into rev-parse
...
Conflicts:
src/util.h
tests-clar/refs/branches/listall.c
2012-06-05 12:52:44 -07:00
Vicent Martí
59d91979d8
Merge pull request #710 from libgit2/breaking-changes
...
Break everything before the release
2012-05-18 13:53:38 -07:00