Update TO script, and also some UI issues.
Junio C Hamano committed
Feb 14, 2006 at 18:00 UTC
8cbf8eaf63d7888cd459762102d0d3af71ea6fa6
2 files changed
+47
-14
TO
+30
-14
@@ -1,17 +1,33 @@
1
#!/bin/sh
2
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 ]"
26
exit 1
10
- }
11
- clean=t
27
+ ;;
28
+ esac
29
shift
13
- ;;
14
-esac
30
+done
31
32
LF='
33
'
@@ -24,8 +40,8 @@ do
40
rebase= done= not_done= trouble=
41
42
# (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`
45
if test "$only_next_1" = "$only_next_2"
46
then
47
not_in_topic=`git-rev-list "^$topic" master`
@@ -47,7 +63,7 @@ do
63
64
# (3)
65
not_in_next=`
50
- git-rev-list --pretty=oneline ^next "$topic" |
66
+ git-rev-list --pretty=oneline ^${next} "$topic" |
67
sed -e 's/^[0-9a-f]* / - /'
68
`
69
if test -n "$not_in_next"
@@ -56,7 +72,7 @@ do
72
then
73
trouble="${LF}### MODIFIED AFTER COOKED ###"
74
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"
76
elif test -n "$done"
77
then
78
not_done=
TODO
+17
@@ -24,6 +24,23 @@ Documentation
24
by Bruce Fields ongoing and things are looking better.
25
26
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
+
44
Design issues
45
-------------
46