NEW254703
pre-commit hook should not add unstaged changes from pbxproj files to index
https://bugs.webkit.org/show_bug.cgi?id=254703
Summary pre-commit hook should not add unstaged changes from pbxproj files to index
Elliott Williams
Reported 2023-03-29 16:23:56 PDT
Currently, if changes to an Xcode project are staged, the entire pbxproj is sorted and git-added to the index. This makes it difficult to commit some parts of a pbxproj while leaving other changes unstaged.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-04-05 16:24:17 PDT
Jonathan Bedard
Comment 2 2023-05-02 08:37:22 PDT
This was something SVN did, we did this for pure-git checkouts in https://bugs.webkit.org/show_bug.cgi?id=239975. Looks like it's the very bottom of Tools/Scripts/hooks/pre-commit that is the offending bit of code. Not quite sure how to address this while retaining the sorting behavior, because it seems like Elliott's ask here makes the sorting behavior impossible...
Elliott Williams
Comment 3 2023-05-05 10:42:31 PDT
> Not quite sure how to address this while retaining the sorting behavior, because it seems like Elliott's ask here makes the sorting behavior impossible… I think what it needs to do is read the index copy (`git show :foo.xcodeproj/project.pbxproj`), sort *that*, and git-add it.
Note You need to log in before you can comment on or make changes to this bug.