summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-06-22 08:15:15 (GMT)
committerPaul Mackerras <paulus@samba.org>2005-06-22 08:15:15 (GMT)
commit806ce0971895249d1ebb641b77f1fa870d86d73e (patch)
treece9a2ea0adba5cd79802c93aff943358cbf1565d /gitk
parentb490a991761bb3bebdb720957f15dee222a052ab (diff)
downloadgit-806ce0971895249d1ebb641b77f1fa870d86d73e.zip
git-806ce0971895249d1ebb641b77f1fa870d86d73e.tar.gz
git-806ce0971895249d1ebb641b77f1fa870d86d73e.tar.bz2
Account for indentation of the checkin comments by git-rev-list
This involves adding indentation when we read a commit with git-cat-file and trimming the whitespace from the headline.
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk7
1 files changed, 6 insertions, 1 deletions
diff --git a/gitk b/gitk
index 922701c..1606c38 100755
--- a/gitk
+++ b/gitk
@@ -174,10 +174,15 @@ proc parsecommit {id contents listed} {
}
} else {
if {$comment == {}} {
- set headline $line
+ set headline [string trim $line]
} else {
append comment "\n"
}
+ if {!$listed} {
+ # git-rev-list indents the comment by 4 spaces;
+ # if we got this via git-cat-file, add the indentation
+ append comment " "
+ }
append comment $line
}
}