Skip to content

Commit

Permalink
git-gui: Include the subject in the status bar after commit
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
spearce committed May 2, 2007
1 parent 3f28f63 commit 2f1a955
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
}

######################################################################
Expand Down

0 comments on commit 2f1a955

Please sign in to comment.