tests/refs/branches


Log

Author Commit Date CI Message
Carlos Martín Nieto d578b45f 2015-03-08T16:46:33 refdb: use the same id for old and new when renaming a reference When we rename a reference, we want the old and new ids to be the same one (as we did not change it). The normal code path looks up the old id from the current value of the brtanch, but by the time we look it up, it does not exist anymore and thus we write a zero id. Pass the old id explicitly instead.
nulltoken 7eb76734 2015-03-04T22:01:20 branch: fix generated reflog message upon renaming
nulltoken 015d4b7b 2015-03-04T21:48:54 branch: fix generated reflog message upon creation
Carlos Martín Nieto 9a97f49e 2014-12-21T15:31:03 config: borrow refcounted references This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
Carlos Martín Nieto 4e498646 2015-01-15T16:50:31 repository: remove log message override for switching the active branch We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
Carlos Martín Nieto 6bfb990d 2015-01-07T14:47:02 branch: don't accept a reflog message override This namespace is about behaving like git's branch command, so let's do exactly that instead of taking a reflog message. This override is still available via the reference namespace.
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Jeff Hostetler 1589a93a 2015-02-02T16:50:10 Fix branch creation when branch name matches namespace of previously deleted branch
Carlos Martín Nieto 5915d700 2014-11-17T14:28:22 branch: consider an empty upstream remote config as not found
Carlos Martín Nieto 82374d98 2014-11-08T20:00:17 branch: add getter for the upstream remote name This gets the value from branch.<foo>.remote.
Arthur Schreiber 9d6c3d28 2014-05-30T15:15:54 Refs: Extend unicode test for branch creation. This adds another assertion to ensure that the reference name inside the git_reference struct returned by `git_branch_create` is returned as precomposed if `core.precomposeunicode` is enabled.
Arthur Schreiber 1a90b1e3 2014-05-30T14:53:28 Refs: Add a unicode test for git_branch_move. This tests that decomposed branch names are correctly precomposed when passed to `git_branch_move` and `core.precomposeunicode` is enabled.
Russell Belfer 8a2ef218 2014-05-08T14:48:27 Don't always test composed-insensitive lookups Only on a filesystem that is composed/decomposed insensitive, should be testing that a branch can be looked up by the opposite form and still work correctly.
Russell Belfer 43a04135 2014-05-08T13:52:46 Pass unconverted data when iconv doesn't like it When using Iconv to convert unicode data and iconv doesn't like the source data (because it thinks that it's not actual UTF-8), instead of stopping the operation, just use the unconverted data. This will generally do the right thing on the filesystem, since that is the source of the non-UTF-8 path data anyhow. This adds some tests for creating and looking up branches with messy Unicode names. Also, this takes the helper function that was previously internal to `git_repository_init` and makes it into `git_path_does_fs_decompose_unicode` which is a useful in tests to understand what the expected results should be.
Russell Belfer 99dfa470 2014-05-01T15:12:12 Some further sandboxing cleanups to tests Trying to find other issues where tests may not clean up quite properly when they are through...
Sven Strickroth fa13ee2d 2014-04-16T16:59:43 Add GIT_BRANCH_ALL to git_branch_t enum git_branch_t is an enum so requesting GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE is not possible as it is not a member of the enum (at least VS2013 C++ complains about it). This fixes a regression introduced in commit a667ca8298193b3103c1dbdcb1f6c527e6e99eb2 (PR #1946). Signed-off-by: Sven Strickroth <email@cs-ware.de>
Ben Straub 494be429 2014-03-02T09:00:00 Merge pull request #2144 from linquize/branch-f-current Do not allow git_branch_create() to force update branch
Linquize 1d08b72e 2014-03-02T19:14:20 Add unit test to show git_branch_create() fails if attempt to force create current branch
Ben Straub 010cec3a 2014-02-04T20:50:40 Add reflog params to git_repository_detach_head
Ben Straub 0d847a31 2014-02-03T14:08:40 Reset helpers: use revparse instead
Ben Straub db092c19 2014-01-30T16:10:18 Allow tests to run without user config
Ben Straub a1710a28 2014-01-29T10:35:46 Enhance testing of signature parameters
Ben Straub 59bb1126 2014-01-28T11:45:30 Provide good default reflog messages in branch api
Ben Straub e871d89b 2014-01-28T11:32:09 Ensure moving a branch updates the reflog
Ben Straub 540c1809 2014-01-28T10:44:33 Add reflog parameters to git_branch_move
Ben Straub 48110f67 2014-01-28T10:31:54 Deleting a branch deletes its reflog
Ben Straub b31ebfbc 2014-01-27T14:12:29 Add reflog params to git_branch_create
Ben Straub 67c4716f 2014-01-27T13:47:48 Add passing reflog tests
Carlos Martín Nieto b25d87c9 2014-01-26T16:03:37 branch: move to git_buf when outputting newly-allocated strings Internally we already did everything with git_bufs, so this is just exposing those functions with public names.
Carlos Martín Nieto 0b28217b 2014-01-15T12:51:31 refs: remove the _with_log differentiation Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
Russell Belfer 96869a4e 2013-12-03T16:45:39 Improve GIT_EUSER handling This adds giterr_user_cancel to return GIT_EUSER and clear any error message that is sitting around. As a result of using that in places, we need to be more thorough with capturing errors that happen inside a callback when used internally. To help with that, this also adds giterr_capture and giterr_restore so that when we internally use a foreach-type function that clears errors and converts them to GIT_EUSER, it is easier to restore not just the return value, but the actual error message text.
Edward Thomson 5588f073 2013-12-09T10:25:36 Clean up warnings
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests