Commit Graph

8 Commits

Author SHA1 Message Date
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
bc6374eac4 remote: allow querying for refspecs
Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs
from the remote and rename the refspec-adding functions to a less
silly name.

Use this instead of the vector index hacks in the tests.
2013-04-20 19:45:40 +02: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
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
Russell Belfer
0d1b094b07 Fix portability issues on Windows
The new tests were not taking core.filemode into account when
testing file modes after repo initialization.  Fixed that and some
other Windows warnings that have crept in.
2013-02-26 13:15:06 -08:00
nulltoken
bbc53e4f93 branch: refactor git_branch_remote_name() tests 2013-02-22 17:04:25 +01:00
nulltoken
c1b5e8c42b branch: Make git_branch_remote_name() cope with orphaned heads 2013-02-22 17:04:23 +01:00
Jameson Miller
2e3e8c889b Teach remote branch to return its remote 2013-02-11 11:36:22 -05:00