support de git push -a

This commit is contained in:
Jephté Clain 2014-05-24 15:53:41 +04:00
parent f45b4b1cd0
commit 508e9f3eb8
2 changed files with 8 additions and 3 deletions

View File

@ -1 +1 @@
38
39

View File

@ -422,9 +422,10 @@ function git_update() {
git pull "$@"
}
function git_push() {
local auto force args
local all auto force args
parse_opts + "${PRETTYOPTS[@]}" \
-a,--auto auto=1 \
-a,--all all=1 \
--auto auto=1 \
-f,--force force=1 \
@ args -- "$@" && set -- "${args[@]}" || {
eerror "$args"
@ -435,6 +436,10 @@ function git_push() {
# si des arguments sont spécifiés, les passer à git sans modification
git push "$@"
return $?
elif [ -n "$all" ]; then
# On a demandé à pusher toutes les branches
git push --all "$@"
return $?
fi
# sinon on push vers origin. vérifier la présence du remote