Skip to content

Add .gitattributes to configure Linguist for Protocol Buffer files#278

Merged
pfi79 merged 3 commits into
hyperledger:mainfrom
oh-tarnished:main
May 20, 2026
Merged

Add .gitattributes to configure Linguist for Protocol Buffer files#278
pfi79 merged 3 commits into
hyperledger:mainfrom
oh-tarnished:main

Conversation

@oh-tarnished
Copy link
Copy Markdown
Contributor

adding .gitattributes

@oh-tarnished oh-tarnished requested a review from a team as a code owner May 18, 2026 06:31
Copy link
Copy Markdown
Member

@jt-nti jt-nti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this PR is related to https://github.com/github-linguist/linguist/blob/main/docs/overrides.md but I'm not sure why it's necessary. As far as I know, there aren't any *.protobuf files, and the following search seems to find the files I would expect...

https://github.com/search?q=repo%3Ahyperledger%2Ffabric-protos++language%3A%22Protocol+Buffer%22&type=code

Please could you explain what the new .gitattributes file is intended to achieve? If there is a good reason, I think it needs updating to match the files/directories found in this repository, and you would need a DCO sign off on your commit.

Thanks.

@oh-tarnished
Copy link
Copy Markdown
Contributor Author

Hey @jt-nti,

The reason is I don't think the.proto files will show up in the repository because the linguist is not able to understand it. I use this exact same .gitattributes configuration in our internal repos to highlight protocol buffers and here's a link that this repository contains that.

https://github.com/hyperledger/fabric-protos/blob/main/gateway%2Fgateway.proto

I know it's a small PR but it's just better visibility for people who are looking at protobuf for the first time.

Thanks.

Signed-off-by: oh-tarnished <srikanthkandarp@gmail.com>
@oh-tarnished
Copy link
Copy Markdown
Contributor Author

oh-tarnished commented May 20, 2026

Signed - DCO

@jt-nti
Copy link
Copy Markdown
Member

jt-nti commented May 20, 2026

@oh-tarnished

Ah, I see, you want Protocol Buffer to show up in the repository stats...

image

In that case, I think you only need this... https://github.com/hyperledger/fabric-protos/pull/280/changes

I'd be happy to approve your PR if you remove the other changes.

Thanks for adding the DCO signoff.

@oh-tarnished oh-tarnished force-pushed the main branch 2 times, most recently from 4501875 to 4150f1e Compare May 20, 2026 17:44
Signed-off-by: oh-tarnished <srikanthkandarp@gmail.com>
Signed-off-by: oh-tarnished <srikanthkandarp@gmail.com>
@oh-tarnished
Copy link
Copy Markdown
Contributor Author

@jt-nti

Done - removed the other configuration

Copy link
Copy Markdown
Member

@jt-nti jt-nti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @oh-tarnished

Are you happy to merge this @pfi79?

@jt-nti jt-nti mentioned this pull request May 20, 2026
@pfi79 pfi79 merged commit a8a9f94 into hyperledger:main May 20, 2026
20 checks passed
@jt-nti
Copy link
Copy Markdown
Member

jt-nti commented May 20, 2026

Nice, thanks @oh-tarnished!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants