Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ install: check
@# chmod from rw-------(default) to rwxrwxr-x, so that users can exec the scripts
@chmod 775 $(TEMPFILE)
$(eval EXISTED_ALIASES := $(shell \
git config --get-regexp 'alias\..*' | awk '{print "git-" substr($$1, 7)}'))
git config get --all --show-names --regexp 'alias\..*' | awk '{print "git-" substr($$1, 7)}'))
@$(foreach COMMAND, $(COMMANDS), \
should_install='yes'; \
if [ ! -z "$(filter $(COMMAND), $(EXISTED_ALIASES))" ] && [ "$$SKIP_CONFLICT_CHECK" != yes ]; then \
Expand Down
8 changes: 4 additions & 4 deletions bin/git-alias
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ fi
case $# in
0)
if [[ -z "$options" ]]; then
git config --get-regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort
git config get --all --show-names --regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort
else
git config "$options" --get-regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort
git config get "$options" --all --show-names --regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort
fi
;;
1)
if [[ -z "$options" ]]; then
git config --get-regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort | grep -e "$1"
git config get --all --show-names --regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort | grep -e "$1"
else
git config "$options" --get-regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort | grep -e "$1"
git config get "$options" --all --show-names --regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort | grep -e "$1"
fi
;;
2)
Expand Down
4 changes: 2 additions & 2 deletions bin/git-bulk
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ removeworkspace() { checkWSName && git config --global --unset bulkworkspaces."$
purge() { git config --global --remove-section bulkworkspaces; }

# list all current workspace locations defined
listall() { git config --global --get-regexp bulkworkspaces; }
listall() { git config get --global --all --show-names --regexp bulkworkspaces; }

# guarded execution of a git command in one specific repository
guardedExecution () {
Expand All @@ -92,7 +92,7 @@ checkGitCommand () {
if git help -a | grep -o -q "\b${corecommand}\b"; then
echo 1>&2 "Core command \"$corecommand\" accepted."
else
if git config --get-regexp alias | grep -o -q "\.${corecommand} "; then
if git config get --all --show-names --regexp alias | grep -o -q "\.${corecommand} "; then
echo 1>&2 "Alias ${corecommand} accepted."
else
usage && echo 1>&2 "error: unknown GIT command: $corecommand" && exit 1
Expand Down
Loading