summaryrefslogtreecommitdiff
path: root/tests-clar/refs/branches
Commit message (Collapse)AuthorAgeFilesLines
* Rename tests-clar to testsBen Straub2013-11-1410-967/+0
|
* Change the git_branch_iterator_new and git_branch_next definitions to use ↵Arthur Schreiber2013-11-051-2/+2
| | | | git_branch_t.
* branch: move from foreach to an iteratorCarlos Martín Nieto2013-11-051-62/+40
| | | | | | | | Create a git_branch_iterator type which is equivalent to the foreach but lets us write loops instead of callbacks. Since the introduction of git_reference_shorthand(), the added value of passing the name is reduced.
* No such thing as an orphan branchCarlos Martín Nieto2013-09-172-4/+4
| | | | | | | | | | | Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
* ref: free the last ref when cancelling git_branch_foreach()yorah2013-06-171-1/+1
| | | | Also fixed an assert typo on nulltoken's HEAD
* Fix trailing whitespacesnulltoken2013-05-151-11/+11
|
* Fix refdb iteration early termination bugRussell Belfer2013-05-111-8/+26
| | | | | | | There was a problem found in the Rugged test suite where the refdb_fs_backend__next function could exit too early in some very specific hashing patterns for packed refs. This ports the Rugged test to libgit2 and then fixes the bug.
* Fix some memory leaksnulltoken2013-05-101-1/+2
|
* git_branch_set_upstream with local branchesNikolai Vladimirov2013-05-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Currently git_branch_set_upstream when passed a local branch creates invalid configuration, for ex. if we setup branch 'tracking_master' to track local 'master' libgit2 generates the following config ``` [branch "track_master"] remote = . merge = .refs/heads/track_master ``` The merge value is invalid and calling git_branch_upstream on 'tracking_master' results in invalid reference error. It should do: ``` [branch "track_master"] remote = . merge = refs/heads/master ```
* Set error message for branch functionsRussell Belfer2013-05-011-0/+6
| | | | | There were a couple of places where an error was being returned from branch related code but no error message was being set.
* remote: allow querying for refspecsCarlos Martín Nieto2013-04-201-1/+1
| | | | | | | | 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.
* remote: handle multiple refspecsCarlos Martín Nieto2013-04-201-1/+2
| | | | | | | | | | | | | 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.
* branch: add more upstream configuration managementCarlos Martín Nieto2013-04-111-0/+35
| | | | | Add functions to set and unset the upstream configuration to complement the getter we already have.
* branch: refactor git_branch_remote_nameCarlos Martín Nieto2013-03-311-1/+1
| | | | | | 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.
* branch: rename 'tracking' to 'upstream'Carlos Martín Nieto2013-03-303-61/+61
| | | | | The term 'tracking' is overloaded. Help distinguish what we mean by using 'upstream' for this part of the library.
* immutable references and a pluggable ref databaseEdward Thomson2013-03-072-20/+67
|
* Fix portability issues on WindowsRussell Belfer2013-02-261-1/+1
| | | | | | 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.
* branch: refactor git_branch_remote_name() testsnulltoken2013-02-221-63/+23
|
* branch: Make git_branch_remote_name() cope with orphaned headsnulltoken2013-02-221-7/+7
|
* Merge pull request #1190 from nulltoken/topic/reset-pathsRussell Belfer2013-02-111-1/+1
|\ | | | | reset: Allow the selective reset of pathspecs
| * Fix MSVC compilation warningsnulltoken2013-02-051-1/+1
| | | | | | | | Fix #1308
* | Teach remote branch to return its remoteJameson Miller2013-02-111-0/+119
|/
* Use cl_assert_equal_s() instead of strcmp().Sebastian Bauer2013-01-251-1/+1
| | | | | Replaced all cl_assert(!strcmp()) or semantically equivalent forms by cl_assert_equal_s().
* Added git_branch_name().Sebastian Bauer2013-01-251-0/+45
| | | | | | | | | 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.
* branch: Introduce git_branch_tracking_name()nulltoken2013-01-161-0/+42
|
* Clean up GCC build warningsBen Straub2012-12-101-1/+1
|
* Merge pull request #1115 from ben/struct-versionsVicent Martí2012-12-051-1/+2
|\ | | | | Version info for public structs
| * Cleanup nitpicky thingsBen Straub2012-11-301-1/+2
| |
* | branch: Deploy EINVALIDSPEC usagenulltoken2012-12-013-0/+22
| |
* | Fix compilation warningsnulltoken2012-12-011-4/+4
|/
* tracking: fix retrieval of the tracking ref of branch with empty merge ↵nulltoken2012-11-281-0/+32
| | | | and/or remote entry
* tracking: remove code duplication in testnulltoken2012-11-281-23/+3
|
* Fix warningBen Straub2012-11-271-1/+1
|
* More external API cleanupVicent Marti2012-11-271-30/+7
| | | | | | Conflicts: src/branch.c tests-clar/refs/branches/create.c
* Rename ref and reflog apis for consistencyBen Straub2012-11-274-12/+12
|
* Reset all static variables to NULL in clar's __cleanupSascha Cunz2012-11-237-0/+19
| | | | | | | | | | | | 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
* repository: Refine repository_head() error reportnulltoken2012-11-121-0/+16
|
* branch: rename config section upon movingnulltoken2012-10-251-0/+22
|
* branch: remove config section upon deletionnulltoken2012-10-251-0/+15
|
* test: extract make_head_orphaned() logicnulltoken2012-10-202-13/+4
|
* tests: leverage git_repository_detach_head()nulltoken2012-10-201-5/+7
|
* errors: deploy GIT_EORPHANEDHEAD usagenulltoken2012-10-192-0/+36
|
* branch: allow deletion of branch when HEAD's missingnulltoken2012-10-191-4/+3
|
* branches: cover EEXISTS propagation upon movingnulltoken2012-10-111-1/+1
|
* branches: propagate EEXISTS upon creationnulltoken2012-10-111-1/+1
|
* branch: introduce git_branch_is_head()nulltoken2012-10-071-0/+80
|
* branch: enhance branch moving test coveragenulltoken2012-10-071-0/+13
|
* refspec: No remote tracking ref from a fetchspec-less remotenulltoken2012-09-132-2/+13
|
* branch: Change `git_branch_delete` to take a refbranch-delete-refVicent Marti2012-08-261-26/+17
|
* Test trailing space after ref oidJoshua Peek2012-08-091-2/+2
|