git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fwd: git p4: feature request - branch check filtering

From
Dan Porter <dpreid@gmail.com>
Date
Feb 18, 2014, 12:42 UTC
Message-ID
<CADtnS+weco6Lvk3hHuM7BcaRsvMkeDCmqH26s19TrgWvBYXAvA@mail.gmail.com>
In-Reply-To
<CADtnS+zWzPY6ftwxWUE+Gb-OKq_Kzf9y+fFfgJ-demWyX3azCg@mail.gmail.com>
Hi,

I'm unable to find a similar issue, and if it's raised on the mailing list I apologize.

I work at a company that has recently moved all CVS, SVN, and git repositories to Perforce. Depots have not been setup correctly in every case, and there is one depot that contains literally hundreds of projects under commercial development (and hundreds of branches as a result)

My project may be in //stupid_depot/commercial/teamporter/rok. This is the path I clone with git-p4. The only branches in this depot that contain files at this path are titled as 'rok_porter_branch/release_1.x' or similar.

When using '--detect-branches' git-p4 checks each key of branches to see if any of them have files in the path I've cloned. Whilst this is good in practice there is unfortunately 6,809 branches, git-p4 processes about 2 a second and just under an hour to perform any git-p4 rebase, submit, or similar operation.

I propose the addition of a branch list filtering option (--filter-branches) that takes either a regular expression or list of branches it should check. This may be useful in sane situations where you don't want to scan every branch in a Perforce repository, or blacklist branches that have undesirable content (for example, one of the branches is called 'svn-backup'. It contains a single, multi-GB tarball.)

It would be ideal to have this information (after initial clone or sync) stored somewhere in the git config where is appropriate so that future submit/rebase operations adhere to this list.

Has something like this been worked on, or has been considered in the past? If not I will consider implementing this after reading up on the Git code guidelines.

Thanks for keeping the Git workflow accessible in painful areas.
Dan
Next: Pete Wyckoff
Message 1 of 5 in “Fwd: git p4: feature request - branch check filtering”
  1. Dan PorterFeb 18, 2014
  2. Pete WyckoffFeb 23, 2014
  3. Dan PorterApr 22, 2014
  4. Junio C HamanoApr 22, 2014
  5. Pete WyckoffApr 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.