Re: [PATCH] Make git reflog expire honour core.sharedRepository.
- From
Junio C Hamano <junio@pobox.com>
- Date
- Jun 15, 2008, 22:47 UTC
- Message-ID
- <7vhcbuco2w.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1213565862-23247-1-git-send-email-madcoder@debian.org>
Pierre Habouzit <madcoder@debian.org> writes:
Show 18 quoted lines
> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
> ---
> builtin-reflog.c | 1 +
> t/t1301-shared-repo.sh | 15 +++++++++++++++
> 2 files changed, 16 insertions(+), 0 deletions(-)
>
> Some people like to have logAllRefUpdates even for bare repositories, and if
> shared, git-gc breaks them.
>
> diff --git a/builtin-reflog.c b/builtin-reflog.c
> index 897d1dc..430929f 100644
> --- a/builtin-reflog.c
> +++ b/builtin-reflog.c
> @@ -308,6 +308,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
> } else if (cmd->updateref && commit_ref(lock)) {
> status |= error("Couldn't set %s", lock->ref_name);
> }
> + adjust_shared_perm(log_file);Why is it sane to do this unconditionally, instead of putting in another else or something?