From: Jonas Fonseca Date: Fri, 20 May 2005 15:04:00 GMT Subject: [PATCH] cg-log: make -r id:id show the given id instead of nothing Message-ID: <20050520150400.GC27395@diku.dk> If cg-log is passed -r cogito-0.10 -r cogito-0.10 no log entries are shown. This patch make it show the log for the given ID. Signed-off-by: Jonas Fonseca Index: cg-log =================================================================== --- ca5fef50fb68a3afbb35e1a48ac622f7a964f021/cg-log (mode:100755) +++ uncommitted/cg-log (mode:100755) @@ -113,6 +113,9 @@ if [ "$log_end" ]; then id1="$(commit-id $log_start)" || exit 1 id2="$(commit-id $log_end)" || exit 1 + if [ "$id1" = "$id2" ]; then + id1=$(git-cat-file commit $id1 | sed -n '/^parent /,0s/parent //p') + fi revls="git-rev-tree $id2 ^$id1" revsort="sort -rn" revfmt="git-rev-tree" -- Jonas Fonseca