Share, Vote, & Discuss Ideas

We're constantly looking for new ways to improve our products and are asking you to help us by sharing your own ideas, voting for ideas you like, and discussing them with the rest of the community.

Make p4ignore syntax match gitignore syntax.

(copied from my forum post here:

I'm pleased to see Perforce honoring gitignore files because we have many cases of generated files living in the same directory as hand-edited files. However, we've been burned by the lack of features in Perforce's parsing of .gitignore (or .p4ignore) files.

The full list of differences that I am aware of:

The biggest problem case for us is like so:

Suppose you have two files "toolbox/foo/bar.h" and "toolbox/foo/private/bar.h". The higher file is generated by stripping private information out of the copy in the "private" folder.

  toolbox/foo/bar.h <- derived
  toolbox/foo/private/bar.h <- hand-edited

In git, we can add "toolbox/foo/.gitignore" containing:

    # generated from private/bar.h

In Perforce, we need to add two files:

    # generated from private/bar.h


    # not generated

This gets really annoying when trying to ignore a file with a common name near the top of your working tree. For example, if you have a generated "Makefile" at the top of your tree and the rest of your Makefile's are hand-edited.

Ben Martin



  • Guest
  • Aug 17 2015