Skip to content

Update list of diffable files#10856

Merged
zachmargolis merged 4 commits intomainfrom
margolis-relax-gitattributes
Jun 21, 2024
Merged

Update list of diffable files#10856
zachmargolis merged 4 commits intomainfrom
margolis-relax-gitattributes

Conversation

@zachmargolis
Copy link
Contributor

@zachmargolis zachmargolis commented Jun 21, 2024

In #10518 we added .gitattributes

However, treating yarn.lock as a binary file has challenged my local workflow, so I can't add files incrementally with git add --patch (git add -p), they get skipped

This came up when I was working on #10854

Before

> git status
...
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   yarn.lock

> git add -p
Only binary files changed.

After

(I can update yarn.lock via git add -p)

changelog: Internal, Source code, Update .gitattributes for yarn.lock
@zachmargolis zachmargolis requested review from a team and lmgeorge June 21, 2024 20:28
Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>
@zachmargolis zachmargolis changed the title Treat yarn.lock as a diffable file Update list of diffable files Jun 21, 2024
Copy link
Contributor

@n1zyy n1zyy left a comment

Choose a reason for hiding this comment

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

I tripped over this trying to look at your PR, too: #10854 (comment)

The spirit of .gitattributes is great, but I agree that these should be made to show diffs.

@zachmargolis zachmargolis merged commit 6c946bb into main Jun 21, 2024
@zachmargolis zachmargolis deleted the margolis-relax-gitattributes branch June 21, 2024 21:08
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