Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorschu <schu-github@schulog.org>2011-06-14 17:16:43 +0400
committerschu <schu-github@schulog.org>2011-07-06 14:25:27 +0400
commit0ffcf78a30377971d4928439ae387396b3922cbf (patch)
tree45ffc20bdba3bb90dca8ea8c322ef20cd27fcd5f /tests
parent7ea50f6077d0da28a471e8de2dc32dcdc994c5c6 (diff)
reference_rename: git compliant reference renaming
So far libgit2 didn't handle the following scenarios: * Rename of reference m -> m/m * Rename of reference n/n -> n Fixed. Since we don't write reflogs, we have to delete any old reflog for the renamed reference. Otherwise git.git will possibly fail when it finds invalid logs. Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/t10-refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/t10-refs.c b/tests/t10-refs.c
index 0d1bba3ff..83ccf300b 100644
--- a/tests/t10-refs.c
+++ b/tests/t10-refs.c
@@ -701,13 +701,13 @@ BEGIN_TEST(rename7, "can be renamed to a new name prefixed with the old name")
git_oid_cpy(&id, git_reference_oid(ref));
/* Create loose references */
- must_pass(git_reference_create_oid(&ref_two, repo, ref_two_name, &id));
+ must_pass(git_reference_create_oid(&ref_two, repo, ref_two_name, &id, 0));
/* An existing reference... */
must_pass(git_reference_lookup(&looked_up_ref, repo, ref_two_name));
/* Can be rename to a new name starting with the old name. */
- must_pass(git_reference_rename(looked_up_ref, ref_two_name_new));
+ must_pass(git_reference_rename(looked_up_ref, ref_two_name_new, 0));
/* Check we actually renamed it */
must_pass(git_reference_lookup(&looked_up_ref, repo, ref_two_name_new));