Russell Belfer
3e199f4285
Set error message for branch functions
...
There were a couple of places where an error was being returned
from branch related code but no error message was being set.
2013-05-01 04:18:46 -07:00
Carlos Martín Nieto
4330ab26b5
remote: handle multiple refspecs
...
A remote can have a multitude of refspecs. Up to now our git_remote's
have supported a single one for each fetch and push out of simplicity
to get something working.
Let the remotes and internal code know about multiple remotes and get
the tests passing with them.
Instead of setting a refspec, the external users can clear all and add
refspecs. This should be enough for most uses, though we're still
missing a querying function.
2013-04-20 17:54:13 +02:00
Russell Belfer
38fd8121a2
Fix win64 warnings
2013-04-18 14:59:25 -07:00
Carlos Martín Nieto
d59942c2ab
branch: add more upstream configuration management
...
Add functions to set and unset the upstream configuration to
complement the getter we already have.
2013-04-11 12:27:25 +02:00
Carlos Martín Nieto
97016f29ab
branch: refactor git_branch_remote_name
...
Return the size we'd need to write to instead of simply an
error. Split the function into two to be used later by the upstream
configuration functions.
2013-03-31 12:51:53 +02:00
Carlos Martín Nieto
a258d8e357
branch: rename 'tracking' to 'upstream'
...
The term 'tracking' is overloaded. Help distinguish what we mean by
using 'upstream' for this part of the library.
2013-03-30 15:45:57 +01:00
Arkadiy Shapkin
10c06114cb
Several warnings detected by static code analyzer fixed
...
Implicit type conversion argument of function to size_t type
Suspicious sequence of types castings: size_t -> int -> size_t
Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)'
Unsigned type is never < 0
2013-03-18 03:30:26 +04:00
Edward Thomson
d00d54645d
immutable references and a pluggable ref database
2013-03-07 11:01:52 -06:00
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
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
nulltoken
28cbd2e2a8
Fix indentations
2013-01-16 22:53:59 +01:00
Edward Thomson
359fc2d241
update copyrights
2013-01-08 17:31:27 -06: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
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
nulltoken
b1a3a70ed1
repository: Refine repository_head() error report
2012-11-12 00:14:51 +01:00
Edward Thomson
b0f6e45d14
create FETCH_HEAD specially instead of as a ref file
2012-11-11 11:56:33 -06:00
nulltoken
aba7078177
config: introduce git_config_rename_section()
2012-10-25 17:42:32 +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
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
62993b6158
branches: propagate EEXISTS upon creation
2012-10-11 14:08:32 +02:00
nulltoken
4ba23be1e5
branch: deploy git_branch_is_head()
2012-10-08 00:44:08 +02:00
nulltoken
0c78f685eb
branch: introduce git_branch_is_head()
2012-10-07 21:03:51 +02:00
nulltoken
e16fc07f7e
refspec: No remote tracking ref from a fetchspec-less remote
2012-09-13 22:31:29 +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
d1445b7528
branch: reduce code duplication
2012-08-27 15:38:38 +02:00
Vicent Marti
1c947daa80
branch: Change git_branch_delete
to take a ref
2012-08-26 18:00:10 -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
786a17cd28
branch: enforce git_branch_delete() parameter checking
2012-07-24 16:09:50 +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
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
Vicent Martí
59d91979d8
Merge pull request #710 from libgit2/breaking-changes
...
Break everything before the release
2012-05-18 13:53:38 -07:00
Vicent Martí
904b67e69f
errors: Rename error codes
2012-05-18 01:48:50 +02: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
nulltoken
392eced6f0
branch: retrieve symbolic references when listing the branches
2012-05-18 00:26:04 +02:00
nulltoken
341a7136f6
branch: make git_branch_delete() return GIT_ENOTFOUND when the branch doesn't exist
2012-05-13 10:30:13 +02:00
Carlos Martín Nieto
6a62543597
branch: simplify error handling for git_branch_move()
...
The cleanup needs to happen anyway, so set the error code and jump
there instead of copying the code.
2012-04-12 23:40:41 +02:00