Skip to content

Mark dist bundles as generated to suppress diffs#11

Merged
mohit-gupta-glean merged 1 commit into
mainfrom
gitattributes-generated-diffs
Jun 18, 2026
Merged

Mark dist bundles as generated to suppress diffs#11
mohit-gupta-glean merged 1 commit into
mainfrom
gitattributes-generated-diffs

Conversation

@mohit-gupta-glean

@mohit-gupta-glean mohit-gupta-glean commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add packages/codex/dist/** to .gitattributes with linguist-generated and -diff so GitHub collapses them in PR review and git diff suppresses their content
  • Update the pre-commit rebuild hook to use an ignorelist — skip rebuild only when ALL staged files are non-source (docs, CI config, git metadata, hooks). New source paths automatically trigger rebuilds without needing to update the hook.

Test plan

  • git diff --exit-code still detects out-of-sync dist (exits non-zero with "Binary files differ")
  • CI check-version-bump unaffected — .gitattributes and .githooks/ don't match PLUGIN_PATHS
  • Commits touching only ignored paths (e.g. .gitattributes) skip rebuild and version bump

@mohit-gupta-glean mohit-gupta-glean force-pushed the gitattributes-generated-diffs branch 2 times, most recently from e4d5c70 to 909e4be Compare June 18, 2026 10:37
- Add packages/codex/dist/** to .gitattributes with linguist-generated
  and -diff so GitHub collapses them and git diff suppresses content.
- Update rebuild hook to use an ignorelist — skip rebuild only when ALL
  staged files are non-source (docs, CI, git metadata, hooks). New
  source paths automatically trigger rebuilds without needing to update
  the hook.
@mohit-gupta-glean mohit-gupta-glean force-pushed the gitattributes-generated-diffs branch from 909e4be to f0a7eb3 Compare June 18, 2026 10:40
@@ -1,8 +1,14 @@
#!/bin/bash
# Rebuild dist/index.js and stage it on every commit.
# Rebuild dist/index.js and stage it on every commit that touches source files.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

#8

Probably not needed, Codex seems to be fixed now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Merging this anyway. You can drop it as part of your PR. Don't think having the attribute will break anything.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There are also other useful changes in the PR.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yea, codex as well does not honour in its new update

@mohit-gupta-glean mohit-gupta-glean merged commit 344fe47 into main Jun 18, 2026
2 checks passed
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.

2 participants