mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
Better behaviour in non workspace directories
This commit is contained in:
parent
d3cccebbd2
commit
02dc8b5b21
|
|
@ -86,7 +86,7 @@ function wsnameToCurrent () {
|
|||
if echo $PWD | grep -o -q $rwsdir; then wsname=$rwsname && return; fi
|
||||
done <<< "$(echo "$(listall)")"
|
||||
# when here then not in workspace dir
|
||||
echo "error: you are not in a workspace directory. your workspaces:" && wslist=$(echo "$(listall)") && echo ${wslist:-'<no workspaces defined yet>'}
|
||||
echo "error: you are not in a workspace directory. your registered workspaces are:" && wslist="$(echo "$(listall)")" && echo "${wslist:-'<no workspaces defined yet>'}" && exit 1
|
||||
}
|
||||
|
||||
# helper to check number of arguments
|
||||
|
|
@ -96,8 +96,8 @@ function allowedargcount () {
|
|||
|
||||
# execute the bulk operation
|
||||
function executBulkOp () {
|
||||
if ! $allwsmode && ! $singlemode; then wsnameToCurrent; fi # by default git bulk works within the 'current' workspace
|
||||
checkGitCommand
|
||||
if ! $allwsmode && ! $singlemode; then wsnameToCurrent; fi # by default git bulk works within the 'current' workspace
|
||||
listall | while read workspacespec; do
|
||||
cwsname=$(echo $workspacespec | cut -f1 -d' ' | cut -f2 -d'.')
|
||||
if [[ -n $wsname ]] && [[ $cwsname != $wsname ]]; then continue; fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue