Request for classic confinement: git-local-ignore

git-local-ignore is a command-line utility that lets users manipulate .git repository’s info/exclude file, which works like .gitignore but is completely local and not included in the repository itself.

In order to function properly, this CLI tool needs to be able to read and write the .git/info/exclude file inside of the git repository tree on the user’s machine. The home and personal-files plugs that currently exist are not applicable to this use case.

In my understanding, this fits under the “tools for local, non-root user driven configuration of the development environment”. Let me know if you have any questions!

Source code: https://github.com/vpukhanov/git-local-ignore
snapcraft.yaml: https://github.com/vpukhanov/git-local-ignore/blob/master/snap/snapcraft.yaml

The installation instructions will be updated with the link to the Snap store, if the classic confinement is granted.

Hi @review-team, is there anything additional info I have to supply?

No this is already on our internal queue to review - we are just a bit busy :wink:

FWIW .git folders that are not immediately under the home directory (ie say $HOME/foo/.git) are already accessible via the home interface - and personal-files can be used if you want to access a ~/.git folder if desired, similarly for ~/.gitignore).

As such I don’t think classic confinement is appropriate in this case, nor is it required.

1 Like

Oh, I think that was the first thing I tried but didn’t have success with. What would be the correct way to write the pattern for the personal-files interface to be able to access any .git directory under the home directory? $HOME/.git?

the home interface should be sufficient. If you need explicitly $HOME/.git then that will require the personal-files interface, but I would expect it to be rare that a user has their entire home folder under version control…

1 Like

Thanks a lot @lucyllewy, I’ll give this a shot! It just wasn’t obvious to me from the docs that the home interface allows access to hidden directories unless they are explicitly in $HOME.

Hey @vpukhanov,

Just to clarify, to access $HOME/.git (or any other top-level hidden data directories within a user’s real home directory) you should use the personal-files interface.

This recent similar post can be of help to move fw with your request Auto connect / alias request for mob-sh. Please note your declaration should follow the expected format (i.e., the interface reference should be named dot-git etc).

Once you have your snapcraft updated (move from classic to strict confinement + add the required interfaces), upload a new revision to the store and let us know so we can proceed with the approval process.

Thanks!

1 Like

@vpukhanov - ping, can you please update the snap with the suggestions above?

@vpukhanov ping, could you make any progress on plugging the suggested interfaces?

@vpukhanov ping, this request cannot proceed without the requested information.

@vpukhanov - since we’ve not heard back from you, we are removing this request from our review queue. When you have more time to respond, simply do so here and we can add the request back to the queue. Thanks