summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-04-29 00:49:22 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-05-02 17:06:09 (GMT)
commit2f1a955b99954fd18c512244e1321dc4cff856b4 (patch)
tree0c19f92ccd20275f075969989d6573952d04c4a1
parent3f28f63f5a87c566ac471e04791daf3da20c67da (diff)
downloadgit-2f1a955b99954fd18c512244e1321dc4cff856b4.zip
git-2f1a955b99954fd18c512244e1321dc4cff856b4.tar.gz
git-2f1a955b99954fd18c512244e1321dc4cff856b4.tar.bz2
git-gui: Include the subject in the status bar after commit
Now that the command line git-commit has made displaying the subject (first line) of the newly created commit popular we can easily do the same thing here in git-gui, without the ugly part of forking off a child process to obtain that first line. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 0ad2815..f6c6d44 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1317,10 +1317,11 @@ A rescan will be automatically started now.
}
set i [string first "\n" $msg]
if {$i >= 0} {
- append reflogm {: } [string range $msg 0 [expr {$i - 1}]]
+ set subject [string range $msg 0 [expr {$i - 1}]]
} else {
- append reflogm {: } $msg
+ set subject $msg
}
+ append reflogm {: } $subject
set cmd [list git update-ref -m $reflogm HEAD $cmt_id $curHEAD]
if {[catch {eval exec $cmd} err]} {
error_popup "update-ref failed:\n\n$err"
@@ -1414,7 +1415,7 @@ A rescan will be automatically started now.
unlock_index
reshow_diff
set ui_status_value \
- "Changes committed as [string range $cmt_id 0 7]."
+ "Created commit [string range $cmt_id 0 7]: $subject"
}
######################################################################