error in process sentinel: fatal: invalid object name 'fatal'
bcc32 opened this issue · 9 comments
After the recent update, I see the following error messages appear after magit-todos runs (before its output is inserted into the magit-status buffer):
error in process sentinel: magit-todos--async-when-done: magit-todos--async-when-done: process "magit-todos--scan-with-git-diff" failed with exit code 128. Output:"fatal: invalid object name 'fatal'.
"
error in process sentinel: magit-todos--async-when-done: process "magit-todos--scan-with-git-diff" failed with exit code 128. Output:"fatal: invalid object name 'fatal'.
"
Error in post-command-hook (magit-section-post-command-hook): (args-out-of-range 99145 99145)
Thanks, I'll fix this soon.
Unfortunately I'm getting the same error.
In the repo where I'm getting the error, I evaluated:
(-> "git merge-base HEAD "
(concat magit-todos-branch-list-merge-base-ref)
shell-command-to-string
string-trim)
which returned:
"fatal: Not a valid object name master"
This is a repo whose default branch is called main
(which is git's new default).
I tried in a repo whose default branch is still called master
, and did not see the error.
Should magit-todos perhaps automatically determine the default branch name by asking git? (init.defaultBranch
config item)
What happens if you set the option magit-todos-branch-list-merge-base-ref
to main
?
It works fine when that variable is set to main
. Also, it stops raising an error in repos whose default branch is called master
, but I suspect that's because behavior for "master"
is hardcoded in magit-todos--insert-todos
.
I still encountered this issue with magit-todos-20230819.732
.
I'm also seeing this on 20230819.732, though the workaround in #151 (comment) does work for repos where the main branch is 'main' or 'master'.
The new update seems to work correctly for me, without customizing magit-todos-branch-list-merge-base-ref
. Thanks!
Thanks, Aaron.