Skip to content

Honor core.logAllRefUpdates #2186

Closed
Closed

Description

@nulltoken

The config core.logAllRefUpdates entry is correctly set when git_repository_init()-ing a new repository.

However, when creating/updating refs, this setting isn't taken into account.

Activity

  1. carlosmn commented on Mar 14, 2014

    @carlosmn
    Member

    In which direction do you mean? That we write reflogs on bare when we shouldn't or that we don't when we should?

  2. nulltoken commented on Mar 14, 2014

    @nulltoken
    MemberAuthor

    Bare repository, with no setting defined, we shouldn't write -> We actually do
    Bare repository, with setting set to false, we shouldn't write -> We actually do
    Non bare repository, with setting set to false, we shouldn't write -> We actually do

  3. carlosmn commented on Mar 14, 2014

    @carlosmn
    Member

    OK, so it looks like we just don't look at whether the repo is bare at all. Getting such information won't be pretty. And we'll have to access the repository's config from the refdb backend, eugh.

  4. nulltoken commented on Mar 15, 2014

    @nulltoken
    MemberAuthor

    How about:

    • Moving should_write_reflog() out of refdb_fs.c into refs.c
    • Making the backend write to the reflog only when the passed in signature and logmessage aren't NULL?

    This would put back the decision making into the refs.c file (making the backend dumber and then easier to implement for other kind of storage).
    This would avoid having the refdb backend depend on the config backend.

    Thoughts?

  5. carlosmn commented on Mar 19, 2014

    @carlosmn
    Member

    I'm not too keen on having the frontend make the decisions atm. There will be backends which will be able to keep more reflogs than the filesystem one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions