mirror of
https://github.com/iwata/git-now.git
synced 2026-09-10 07:26:29 -04:00
Merge branch 'hotfix/0.1.0.2' into develop
This commit is contained in:
commit
eae3c7642f
|
|
@ -15,7 +15,7 @@ __git-now-add ()
|
|||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments \
|
||||
_arguments -s : \
|
||||
'-n[do not actually add files; only show which ones would be added]'\
|
||||
'-v[show files as they are added]'\
|
||||
'-f[allow adding otherwise ignored files]'\
|
||||
|
|
@ -103,7 +103,7 @@ case $state in
|
|||
;;
|
||||
|
||||
(grep)
|
||||
_arguments \
|
||||
_arguments -s : \
|
||||
'-p[generate diff in patch format]'\
|
||||
'-s[generate diffstat instead of patch]'\
|
||||
'-m[limit git-now commits by your name]'\
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ _git-now ()
|
|||
;;
|
||||
|
||||
(grep)
|
||||
_arguments \
|
||||
_arguments -s : \
|
||||
'-p[generate diff in patch format]'\
|
||||
'-s[generate diffstat instead of patch]'\
|
||||
'-m[limit git-now commits by your name]'\
|
||||
|
|
@ -79,7 +79,7 @@ __git-now-add ()
|
|||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments \
|
||||
_arguments -s : \
|
||||
'-n[do not actually add files; only show which ones would be added]'\
|
||||
'-v[show files as they are added]'\
|
||||
'-f[allow adding otherwise ignored files]'\
|
||||
|
|
|
|||
13
git-now-add
13
git-now-add
|
|
@ -1,8 +1,8 @@
|
|||
usage() {
|
||||
echo "usage: git now add [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]"
|
||||
echo " [--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N]"
|
||||
echo " [--refresh] [--ignore-errors] [--ignore-missing] [ --stat | -s ] [--]"
|
||||
echo " [<filepattern>...]"
|
||||
echo " [--refresh] [--ignore-errors] [--ignore-missing] [--stat | -s] [--push]"
|
||||
echo " [--] [<filepattern>...]"
|
||||
}
|
||||
|
||||
cmd_default() {
|
||||
|
|
@ -11,7 +11,9 @@ cmd_default() {
|
|||
git add -u
|
||||
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
|
||||
else
|
||||
local is_all=false
|
||||
local is_stat=false
|
||||
local is_push=false
|
||||
local args=()
|
||||
|
||||
# args loop
|
||||
|
|
@ -19,13 +21,17 @@ cmd_default() {
|
|||
do
|
||||
if [ $arg = "--stat" ] || [ $arg = "-s" ]; then
|
||||
is_stat=true
|
||||
elif [ $arg = "--all" ]; then
|
||||
is_all=true
|
||||
elif [ $arg = "--push" ]; then
|
||||
is_push=true
|
||||
else
|
||||
n=${#args[@]}
|
||||
args[$n]=$arg
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $1 != "--all" ]; then
|
||||
if ! $is_all; then
|
||||
git add ${args[@]}
|
||||
else
|
||||
git add -u
|
||||
|
|
@ -37,6 +43,7 @@ cmd_default() {
|
|||
else
|
||||
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
|
||||
fi
|
||||
$is_push && git push
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
require 'formula'
|
||||
|
||||
class GitNow < Formula
|
||||
url 'https://github.com/iwata/git-now.git', :tag => 'v0.1.0.1'
|
||||
version '0.1.0.1'
|
||||
url 'https://github.com/iwata/git-now.git', :tag => 'v0.1.0.2'
|
||||
version '0.1.0.2'
|
||||
head 'https://github.com/iwata/git-now.git', :branch => 'develop'
|
||||
homepage 'https://github.com/iwata/git-now'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue