Ignore files generated by protobuf in the tree

RESOLVED FIXED in Firefox -esr60

Status

defect
RESOLVED FIXED
7 months ago
6 months ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

(Blocks 1 bug)

unspecified
mozilla65
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 fixed, firefox65 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

7 months ago
These are autogenerated files so we shouldn't try to reformat them.
Assignee

Updated

7 months ago
Blocks: clang-format
Assignee

Comment 1

7 months ago
These are autogenerated files so we shouldn't try to reformat them.

Comment 2

7 months ago
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9f44e47ef7b3
Ignore files generated by protobuf in the tree r=sylvestre
What paths is this intended to catch? I don't see any matches in my tree. (This patch looks like a mix of regex and glob...)

Comment 4

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9f44e47ef7b3
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Assignee

Comment 5

6 months ago
(In reply to David Major [:dmajor] from comment #3)
> What paths is this intended to catch? I don't see any matches in my tree.
> (This patch looks like a mix of regex and glob...)

Sorry I missed your question.  This is intended to catch these files:

<https://searchfox.org/mozilla-central/search?q=&case=false&regexp=false&path=.pb.%7Bcc%2Ch%7D>
Assignee

Comment 6

6 months ago
Comment on attachment 9027804 [details]
Bug 1510124 - Ignore files generated by protobuf in the tree

[ESR Uplift Approval Request]

If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is required for easier backporting of patches after the reformatting of ESR using clang-format.

User impact if declined: Declining this will negatively impact our developers' ability to easily backport their patches to ESR in the future.

Fix Landed on Version: 65

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): This is NPOTB.

String or UUID changes made by this patch: None
Attachment #9027804 - Flags: approval-mozilla-esr60?
(In reply to :Ehsan Akhgari from comment #5)
> (In reply to David Major [:dmajor] from comment #3)
> > What paths is this intended to catch? I don't see any matches in my tree.
> > (This patch looks like a mix of regex and glob...)
> 
> Sorry I missed your question.  This is intended to catch these files:
> 
> <https://searchfox.org/mozilla-central/
> search?q=&case=false&regexp=false&path=.pb.%7Bcc%2Ch%7D>

Do I understand correctly that the patch would also catch e.g. `foo_pb_h`? I'm still not quite clear on what exactly the wildcard format is here.
Comment on attachment 9027804 [details]
Bug 1510124 - Ignore files generated by protobuf in the tree

OK for uplift to ESR60 as part of the clang-format project.
Attachment #9027804 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Assignee

Comment 9

6 months ago
(In reply to David Major [:dmajor] from comment #7)
> (In reply to :Ehsan Akhgari from comment #5)
> > (In reply to David Major [:dmajor] from comment #3)
> > > What paths is this intended to catch? I don't see any matches in my tree.
> > > (This patch looks like a mix of regex and glob...)
> > 
> > Sorry I missed your question.  This is intended to catch these files:
> > 
> > <https://searchfox.org/mozilla-central/
> > search?q=&case=false&regexp=false&path=.pb.%7Bcc%2Ch%7D>
> 
> Do I understand correctly that the patch would also catch e.g. `foo_pb_h`?
> I'm still not quite clear on what exactly the wildcard format is here.

It gets replaced with '**' and gets passed to --exclude as an argument to git diff, see:

https://searchfox.org/mozilla-central/rev/fd32b3a6fa3eff1468311f6fcf32b45c117136df/python/mozbuild/mozbuild/mach_commands.py#2684
https://git-scm.com/docs/gitglossary#gitglossary-glob

<quote>
A leading "**" followed by a slash means match in all directories. For example, "**/foo" matches file or directory "foo" anywhere, the same as pattern "foo". "**/foo/bar" matches file or directory "bar" anywhere that is directly under directory "foo".
</quote>
Target Milestone: Firefox 65 → mozilla65
You need to log in before you can comment on or make changes to this bug.