vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

Exclude branches from graph using 'git-log --exclude=<glob-pattern>' option

Open mshield5 opened this issue 5 years ago • 3 comments

Describe the feature that you'd like Provide a way to exclude branches from the graph using a predefined glob pattern.

Additional context (optional) I am looking for something similar to what was done in commit f6701ee - Predefine an array of custom glob patterns for the Branch dropdown with the new setting git-graph.customBranchGlobPatterns except to exercise the git-log --exclude option instead of the --glob option.

Your words from the readme with modifications for the new feature: Predefine an array of custom glob patterns with the new setting git-graph.customBranchExcludeGlobPatterns, allowing you to use them anytime from the 'Branches' dropdown. For example: [{"name": "Exclude Feature Requests", "exclude": "heads/feature/*"}]

mshield5 avatar Aug 07 '20 20:08 mshield5

Hi @mshield5,

Thanks for raising this feature request, I think many users would utilise this functionality!

I’ll include it in an upcoming release!

Also, thank you for taking the time to provide such clear additional context around what you’re requesting, I really appreciate the effort you went to!

mhutchie avatar Aug 07 '20 23:08 mhutchie

Here's a usecase: having just noticed this feature in the settings, I tried to use

    "git-graph.customBranchGlobPatterns": [
        {"name": "Hide bugfixes", "glob": "!heads/fix*"}
    ]

to exclude bugfix branches, but it doesn't work

MetRonnie avatar Feb 05 '21 11:02 MetRonnie

I'm joining the topicstarter. Unfortunately, globs are suitable for including elements. But they are not suitable for exclusion. We need full support for the --exclude flag.

inmativ avatar Feb 13 '24 08:02 inmativ