summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4744d72)
raw | patch | inline | side by side (parent: 4744d72)
author | Pierre Habouzit <madcoder@debian.org> | |
Sun, 15 Jun 2008 21:37:42 +0000 (23:37 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 15 Jun 2008 22:54:06 +0000 (15:54 -0700) |
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-reflog.c | patch | blob | history | |
t/t1301-shared-repo.sh | patch | blob | history |
diff --git a/builtin-reflog.c b/builtin-reflog.c
index 897d1dcac6b34e0c631c94b98c489db075e90bb2..b151e24ff94e06840db7e57014fe4a73ea811575 100644 (file)
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -307,6 +307,8 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
unlink(newlog_path);
} else if (cmd->updateref && commit_ref(lock)) {
status |= error("Couldn't set %s", lock->ref_name);
+ } else {
+ adjust_shared_perm(log_file);
}
}
free(newlog_path);
diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
index 5e4252a320d5f967eacb9bd68bb0a510fe748e80..6c78c8bc9b76828c258f524e73b40d7daff7c305 100755 (executable)
--- a/t/t1301-shared-repo.sh
+++ b/t/t1301-shared-repo.sh
done
+test_expect_success 'git reflog expire honors core.sharedRepository' '
+ git config core.sharedRepository group &&
+ git reflog expire --all &&
+ actual="$(ls -l .git/logs/refs/heads/master)" &&
+ case "$actual" in
+ -rw-rw-*)
+ : happy
+ ;;
+ *)
+ echo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]
+ false
+ ;;
+ esac
+'
+
test_done