Changeset View
Changeset View
Standalone View
Standalone View
tools/tools/git/git-arc.sh
Show First 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | build_commit_list() | ||||
echo "$commits" | echo "$commits" | ||||
} | } | ||||
gitarc__create() | gitarc__create() | ||||
{ | { | ||||
local commit commits doprompt list o prev reviewers subscribers | local commit commits doprompt list o prev reviewers subscribers | ||||
list= | list= | ||||
prev="" | |||||
if [ "$(git config --bool --get arc.list 2>/dev/null || echo false)" != "false" ]; then | if [ "$(git config --bool --get arc.list 2>/dev/null || echo false)" != "false" ]; then | ||||
list=1 | list=1 | ||||
fi | fi | ||||
doprompt=1 | doprompt=1 | ||||
while getopts lr:s: o; do | while getopts lp:r:s: o; do | ||||
case "$o" in | case "$o" in | ||||
l) | l) | ||||
list=1 | list=1 | ||||
;; | ;; | ||||
p) | |||||
prev="$OPTARG" | |||||
;; | |||||
r) | r) | ||||
reviewers="$OPTARG" | reviewers="$OPTARG" | ||||
;; | ;; | ||||
s) | s) | ||||
subscribers="$OPTARG" | subscribers="$OPTARG" | ||||
;; | ;; | ||||
*) | *) | ||||
err_usage | err_usage | ||||
Show All 10 Lines | if [ "$list" ]; then | ||||
done | git_pager | done | git_pager | ||||
if ! prompt; then | if ! prompt; then | ||||
return | return | ||||
fi | fi | ||||
doprompt= | doprompt= | ||||
fi | fi | ||||
save_head | save_head | ||||
prev="" | |||||
for commit in ${commits}; do | for commit in ${commits}; do | ||||
if create_one_review "$commit" "$reviewers" "$subscribers" "$prev" \ | if create_one_review "$commit" "$reviewers" "$subscribers" "$prev" \ | ||||
"$doprompt"; then | "$doprompt"; then | ||||
prev=$(commit2diff "$commit") | prev=$(commit2diff "$commit") | ||||
else | else | ||||
prev="" | prev="" | ||||
fi | fi | ||||
done | done | ||||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |