git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Make git reflog expire honour core.sharedRepository.

From
Pierre Habouzit <madcoder@debian.org>
Date
Jun 15, 2008, 22:55 UTC
Message-ID
<20080615225459.GA13472@artemis.madism.org>
In-Reply-To
<7vhcbuco2w.fsf@gitster.siamese.dyndns.org>
On Sun, Jun 15, 2008 at 10:47:51PM +0000, Junio C Hamano wrote:
Show 23 quoted lines
> Pierre Habouzit <madcoder@debian.org> writes:
> 
> > 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?
  Huh indeed, the proper patch should have been:

- } + } else { + adjust_shared_perm(log_file); + }

  It was inattention on my end, I focused more on writing a test case
than on the one liner fix. Sorry.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 5 in “Make git reflog expire honour core.sharedRepository.”
  1. Make git reflog expire honour core.sharedRepository.Pierre Habouzit, Jun 15, 2008
  2. Junio C HamanoJun 15, 2008
  3. Pierre HabouzitJun 15, 2008
  4. Johannes SchindelinJun 16, 2008
  5. Johannes SchindelinJun 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.