GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — use git cat-file -e instead of git rev-list in _rev_exists by ptarjan · Pull Request #3605 · pre-commit/pre-commit Conversation
|
|
How is that different than the current implementation? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This reverts commit 5a4235c.
There was an error while loading. Please reload this page.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was an error while loading. Please reload this page.
|
I mean I liked the == 0 since the docs explicitly talk about retuning 0
when the SHA exists but this is your project and I just want the
functionality. I’ll switch back to not
…On Fri, Dec 26, 2025 at 12:41 PM anthony sottile ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pre_commit/commands/hook_impl.py
<#3605 (comment)>
:
> - return not subprocess.call(('git', 'rev-list', '--quiet', rev))
+ return not bool(
+ subprocess.call(
+ ('git', 'cat-file', '-e', rev),
+ stderr=subprocess.DEVNULL,
+ ),
+ )
not bool(...) is the same as not ... which you'll notice is *exactly what
the original code does*
—
Reply to this email directly, view it on GitHub
<#3605 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAJZT6M52IG7ENARCRZII34DW2QTAVCNFSM6AAAAACQCVVVUOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTMMJTHEZTAOBQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
do you actually understand what |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
You're absolutely right! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is there anything else on this PR you need from me? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Would you prefer anything else from me to get this merged? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@asottile didn't want a PR generated by Claude to be included in his repo so I generated this one by hand |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
git rev-list --quiet is slow in a large repo
There was an error while loading. Please reload this page.