Skip to content

Commit

Permalink
Fix GIT_COMMIT_STATUS check in git_commit_prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Oct 10, 2024
1 parent 4c04e61 commit f5faf22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fish/conf.d/git_commit_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ function git_commit_prompt
echo "$commit_msg" >"/tmp/.git_commit_message~"
eval $argv # run any prequisite commands

echo "$commit_msg" | git commit -F - | tail -n +2
set -l git_commit_output (echo "$commit_msg" | git commit -F -)
set -l GIT_COMMIT_STATUS $status
echo "$git_commit_output" | tail -n +2

set GIT_PIPE_STATUS $status
if test "$GIT_PIPE_STATUS" -eq 0
if test "$GIT_COMMIT_STATUS" -eq 0
# Delete saved commit message if commit was successful
/bin/rm -f "/tmp/.git_commit_message~"
end
Expand Down

0 comments on commit f5faf22

Please sign in to comment.