Skip to content

Commit 8cbf8ea

Browse files
author
Junio C Hamano
committed
Update TO script, and also some UI issues.
1 parent 2f1750a commit 8cbf8ea

File tree

2 files changed

+47
-14
lines changed

2 files changed

+47
-14
lines changed

TO

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
#!/bin/sh
22

3-
clean=
4-
case "$1" in
5-
--clean)
6-
branch=`git symbolic-ref HEAD` &&
7-
test refs/heads/master = "$branch" || {
8-
echo >&2 Not on master
3+
clean= next=next
4+
while case $# in 0) break ;; esac
5+
do
6+
case "$1" in
7+
--clean)
8+
branch=`git symbolic-ref HEAD` &&
9+
test refs/heads/master = "$branch" || {
10+
echo >&2 Not on master
11+
exit 1
12+
}
13+
clean=t
14+
;;
15+
--next)
16+
test 2 -le $# || {
17+
echo >&2 "Need argument"
18+
exit 1
19+
}
20+
next="$2"
21+
git rev-parse --verify "$next" >/dev/null || exit
22+
shift
23+
;;
24+
*)
25+
echo >&2 "$0 [--clean | --next test-next ]"
926
exit 1
10-
}
11-
clean=t
27+
;;
28+
esac
1229
shift
13-
;;
14-
esac
30+
done
1531

1632
LF='
1733
'
@@ -24,8 +40,8 @@ do
2440
rebase= done= not_done= trouble=
2541

2642
# (1)
27-
only_next_1=`git-rev-list ^master "^$topic" next | sort`
28-
only_next_2=`git-rev-list ^master next | sort`
43+
only_next_1=`git-rev-list ^master "^$topic" ${next} | sort`
44+
only_next_2=`git-rev-list ^master ${next} | sort`
2945
if test "$only_next_1" = "$only_next_2"
3046
then
3147
not_in_topic=`git-rev-list "^$topic" master`
@@ -47,7 +63,7 @@ do
4763

4864
# (3)
4965
not_in_next=`
50-
git-rev-list --pretty=oneline ^next "$topic" |
66+
git-rev-list --pretty=oneline ^${next} "$topic" |
5167
sed -e 's/^[0-9a-f]* / - /'
5268
`
5369
if test -n "$not_in_next"
@@ -56,7 +72,7 @@ do
5672
then
5773
trouble="${LF}### MODIFIED AFTER COOKED ###"
5874
fi
59-
not_done="${LF}Still not merged in next$rebase.$LF$not_in_next"
75+
not_done="${LF}Still not merged in ${next}$rebase.$LF$not_in_next"
6076
elif test -n "$done"
6177
then
6278
not_done=

TODO

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,23 @@ Documentation
2424
by Bruce Fields ongoing and things are looking better.
2525

2626

27+
UI
28+
--
29+
30+
* Make "git branch -d foo" while on foo branch suggest "maybe
31+
you want to go back to 'master'?"
32+
33+
* Error message from "git checkout -b bar v2.6.10" should assume
34+
v2.6.10 is an attempt to switch to a new branch based on
35+
mistyped tag, not an attempt to revert path v2.6.10 from the
36+
HEAD commit with extra "make and switch to this branch"
37+
argument.
38+
39+
* "git commit [-i|-o] paths..." with misspelled paths would be
40+
silently ignored. Add a flag to ls-files to catch unmatched
41+
pathspec to prevent this.
42+
43+
2744
Design issues
2845
-------------
2946

0 commit comments

Comments
 (0)