Skip to content

pre-commit hook complains .git/index.lock being held #156

@mlawren

Description

@mlawren

I'm trying to use a pre-commit hook to normalize vcard files[1], which wants to call git-add. But I'm running into the issue that something already has a lock on .git/index.lock.

Mar 03 13:01:58 b xandikos[1445521]: fatal: Unable to create '/var/lib/xandikos/family/contacts/41001478-d6f0-4861-84a5-89d1545b0a02/.git/index.lock': File exists.
Mar 03 13:01:58 b xandikos[1445521]: Another git process seems to be running in this repository, e.g.
Mar 03 13:01:58 b xandikos[1445521]: an editor opened by 'git commit'. Please make sure all processes
Mar 03 13:01:58 b xandikos[1445521]: are terminated then try again. If it still fails, a git process
Mar 03 13:01:58 b xandikos[1445521]: may have crashed in this repository earlier:
Mar 03 13:01:58 b xandikos[1445521]: remove the file manually to continue.

Is it xandikos itself holding the lock?

[1] the desire is to make the vcf consistent in terms of newlines, field order, newline at end of file, etc. Different clients produce different kinds of vcf and trying to debug who changed what is rather hard. Would be nice of xandikos did that itself.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions