Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-21991

Negate a pattern in Excluded files from pull request diffs

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      Users can exclude certain files from appearing in pull requests from Repository settings > Excluded files.

      At the moment, it is not possible to negate a pattern. This can create issues in situations like the following:

      A repo has the following directory structure, and users want to exclude everything but the contents in directory C:
       - A
         -- B
           -- foo.go
           -- bar.go
         -- C
           -- c.go
         -- D
           -- d.go
        x.go
        y.go

      Since it is not possible to negate patterns, the way to achieve this at the moment would be to use the following patterns:

      /A/B/**
      /A/D/**
      /A/y.go
      /A/x.go

      If the directories and files in A are generated content that dynamically changes, the patterns need to be updated with each change, which is not very practical.

      Suggested Solution

      Allow pattern negation in Excluded files.

      In the use case mentioned above, users could then define a pattern like the following, without continuously needing to update the excluded files and directories:

      root/A/*
      !root/A/C
      !root/A/C/**

              Unassigned Unassigned
              tboudale Theodora Boudale
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: