From 2708ab61cbc89a025c71aaa0bffaebe97784da71 Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Sun, 7 Dec 2025 18:37:50 -0500 Subject: [PATCH] minor update to git-prompt --- git-prompt/git-completion.bash | 5 +++-- internal/update-git-prompt.sh | 17 +++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) mode change 100644 => 100755 internal/update-git-prompt.sh diff --git a/git-prompt/git-completion.bash b/git-prompt/git-completion.bash index e3d88b0..73abea3 100644 --- a/git-prompt/git-completion.bash +++ b/git-prompt/git-completion.bash @@ -2218,7 +2218,7 @@ __git_log_gitk_options=" " # Options that go well for log and shortlog (not gitk) __git_log_shortlog_options=" - --author= --committer= --grep= + --author= --grep= --exclude= --all-match --invert-grep " # Options accepted by log and show @@ -2296,6 +2296,7 @@ __git_complete_log_opts () $__git_log_shortlog_options $__git_log_gitk_options $__git_log_show_options + --committer= --root --topo-order --date-order --reverse --follow --full-diff --abbrev-commit --no-abbrev-commit --abbrev= @@ -3229,7 +3230,7 @@ _git_shortlog () __gitcomp " $__git_log_common_options $__git_log_shortlog_options - --numbered --summary --email + --committer --numbered --summary --email " return ;; diff --git a/internal/update-git-prompt.sh b/internal/update-git-prompt.sh old mode 100644 new mode 100755 index bab4547..b22fd9d --- a/internal/update-git-prompt.sh +++ b/internal/update-git-prompt.sh @@ -1,12 +1,17 @@ #!/usr/bin/env bash -# the command used to initialize our partial subtree -#git remote add -f -t master --no-tags gitprompt https://github.com/git/git.git -#git read-tree --prefix=git-prompt/ -u gitprompt/master:contrib/completion -#git commit +# check if we have added the git remote already +hasRemote=$(git remote -vv | grep 'gitprompt' || echo 'nope') -# the command used to update our partial subtree -git rm -rf git-prompt +if [[ "$hasRemote" == "nope" ]]; then + # add the remote so we can do a partial subtree + git remote add -f -t master --no-tags gitprompt https://github.com/git/git.git +else + # clear out existing git-prompt folder, so we can rebuild it + git rm -rf git-prompt +fi + +# update our partial subtree git read-tree --prefix=git-prompt/ -u gitprompt/master:contrib/completion git commit