Merge branch 'js/merge-rr'
authorJunio C Hamano <gitster@pobox.com>
Tue, 15 Jul 2008 06:48:48 +0000 (23:48 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Jul 2008 06:56:27 +0000 (23:56 -0700)
* js/merge-rr:
  Move MERGE_RR from .git/rr-cache/ into .git/

Conflicts:
builtin-rerere.c

branch.c
rerere.c
t/t4200-rerere.sh

index 56e9492..b1e59f2 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -166,7 +166,7 @@ void create_branch(const char *head,
 void remove_branch_state(void)
 {
        unlink(git_path("MERGE_HEAD"));
-       unlink(git_path("rr-cache/MERGE_RR"));
+       unlink(git_path("MERGE_RR"));
        unlink(git_path("MERGE_MSG"));
        unlink(git_path("SQUASH_MSG"));
 }
index eec2b50..1258921 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -342,7 +342,7 @@ int setup_rerere(struct path_list *merge_rr)
        if (!is_rerere_enabled())
                return -1;
 
-       merge_rr_path = xstrdup(git_path("rr-cache/MERGE_RR"));
+       merge_rr_path = xstrdup(git_path("MERGE_RR"));
        fd = hold_lock_file_for_update(&write_lock, merge_rr_path, 1);
        read_rr(merge_rr);
        return fd;
index cf10557..b5a4202 100755 (executable)
@@ -57,7 +57,7 @@ test_expect_success 'conflicting merge' '
        ! git merge first
 '
 
-sha1=$(sed -e 's/      .*//' .git/rr-cache/MERGE_RR)
+sha1=$(sed -e 's/      .*//' .git/MERGE_RR)
 rr=.git/rr-cache/$sha1
 test_expect_success 'recorded preimage' "grep ^=======$ $rr/preimage"
 
@@ -143,7 +143,7 @@ test_expect_success 'rerere kicked in' "! grep ^=======$ a1"
 test_expect_success 'rerere prefers first change' 'test_cmp a1 expect'
 
 rm $rr/postimage
-echo "$sha1    a1" | perl -pe 'y/\012/\000/' > .git/rr-cache/MERGE_RR
+echo "$sha1    a1" | perl -pe 'y/\012/\000/' > .git/MERGE_RR
 
 test_expect_success 'rerere clear' 'git rerere clear'
 
@@ -190,7 +190,7 @@ test_expect_success 'file2 added differently in two branches' '
        git add file2 &&
        git commit -m version2 &&
        ! git merge fourth &&
-       sha1=$(sed -e "s/       .*//" .git/rr-cache/MERGE_RR) &&
+       sha1=$(sed -e "s/       .*//" .git/MERGE_RR) &&
        rr=.git/rr-cache/$sha1 &&
        echo Cello > file2 &&
        git add file2 &&