gitdoc icon indicating copy to clipboard operation
gitdoc copied to clipboard

Feature Request: filter branches

Open cori opened this issue 3 years ago • 2 comments

I'd love a setting that allows me to provide a list of branches for which, when I have them checked out, GitDoc does not perform an autocommit. I don't see this anywhere in the current extension.

The usecase is that I do some Remote SHH-based development. I'm happy to have autocommits to my own local main branch because I have autoPush turned off, but Id rather not have those branches committed to remotely (and in truth would prefer them not to be committed to locally).

This is an itch-scratch, so I may have a stab at it myself - not sure if a PR is likely to be merged.

cori avatar Dec 27 '22 13:12 cori

Hey! Since auto-commits need to be explicitly enabled per branch, and you seemed to indicate not wanting to auto-commit for either local or remote branches, would it be sufficient to just not enable GitDoc for the repos you don't want that behavior?

Or are you enabling GitDoc at the user-level, and wanting to exclude some repos from auto-commuting?

Apologies for the dumb questions, I just wanted to make sure I was following your use case. And regarding a PR: I'd be more than happy to review/merge one if you had the time 👍

lostintangent avatar Dec 27 '22 15:12 lostintangent

Heh i certainly failed in my duty as an open-source user here - sorry for the long delay after your very prompt reply.

I think what I might have seen that was alarming at this time was some unexpected and inconsistent settings sync between my local and remote instances - as I mentioned I have GitDoc generally turned on locally but autopush set to false, so it's not too concerning if GitDoc makes commits on main. But when I installed GitDoc remotely in this instance I think it autopushed to main while I was accidentally working on that branch remotely. I do have it enabled at the user level, so I suppose what I was / am asking is for an exclusion list.

The reasons this has come up again is that I still use GitDoc daily and was toying with the idea of poking at wiring it to something like a local commitlint. This misunderstanding isn't a blocker for that necessarily.

cori avatar Sep 30 '23 12:09 cori

I just added a new gitdoc.excludedBranches setting, which will go out in the next extension update (~tomorrow). Thanks!

lostintangent avatar Apr 29 '24 21:04 lostintangent