Skip to content

Commit ba296ff

Browse files
author
Junio C Hamano
committed
Update TOpic to show dates for everybody.
1 parent 99bd27e commit ba296ff

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

TO

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ do
2929
shift
3030
done
3131

32+
master_sha1=`git rev-parse --verify refs/heads/master`
3233
LF='
3334
'
3435
(cd .git/refs/heads && find -type f) |
@@ -38,7 +39,12 @@ sed -n \
3839
while read topic
3940
do
4041
rebase= done= not_done= trouble= date=
42+
topic_sha1=`git rev-parse --verify "refs/heads/$topic"`
4143

44+
date=`
45+
git-rev-list -1 --pretty "$topic" |
46+
sed -ne 's/^Date: *\(.*\)/ (\1)/p'
47+
`
4248
# (1)
4349
only_next_1=`git-rev-list ^master "^$topic" ${next} | sort`
4450
only_next_2=`git-rev-list ^master ${next} | sort`
@@ -62,20 +68,18 @@ do
6268

6369
# (3)
6470
not_in_next=`
65-
git-rev-list --pretty=oneline ^${next} "$topic"
71+
git-rev-list --pretty=oneline ^${next} "$topic" |
72+
sed -e 's/^[0-9a-f]* / - /'
6673
`
6774
if test -n "$not_in_next"
6875
then
6976
if test -n "$done"
7077
then
78+
# If $topic and master are the same,
79+
# it is fine.
80+
test "$master_sha1" = "$topic_sha1" ||
7181
trouble="${LF}### MODIFIED AFTER COOKED ###"
7282
fi
73-
last=`expr "$not_in_next" : '\([0-9a-f]*\) '`
74-
date=`
75-
git-rev-list -1 --pretty "$last" |
76-
sed -ne 's/^Date: *\(.*\)/ (\1)/p'
77-
`
78-
not_in_next=`echo "$not_in_next" | sed -e 's/^[0-9a-f]* / - /'`
7983
not_done="${LF}Still not merged in ${next}$rebase.$LF$not_in_next"
8084
elif test -n "$done"
8185
then

0 commit comments

Comments
 (0)