summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd11b82)
raw | patch | inline | side by side (parent: bd11b82)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 19 Nov 2006 08:38:48 +0000 (03:38 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 19 Nov 2006 08:38:48 +0000 (03:38 -0500) |
In order to allow the user to toggle include/exclude from next commit
for files which were partially included in the last commit we need the
current index mode+sha1 data stored in our file_states array. For
any partially included file we have this information from diff-files,
so we just have to copy it over to the diff-index portion of our state
array.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
for files which were partially included in the last commit we need the
current index mode+sha1 data stored in our file_states array. For
any partially included file we have this information from diff-files,
so we just have to copy it over to the diff-index portion of our state
array.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 3f0424a33af88da66283051e8a35585fcdad6cbb..dcb25c8d69665f28070cf40378c63d55504e2a2e 100755 (executable)
--- a/git-gui
+++ b/git-gui
proc commit_committree {fd_wt curHEAD msg} {
global single_commit gitdir HEAD PARENT commit_type tcl_platform
global ui_status_value ui_comm selected_commit_type
- global file_states selected_paths
+ global file_states selected_paths rescan_active
gets $fd_wt tree_id
if {$tree_id eq {} || [catch {close $fd_wt} err]} {
if {$single_commit} do_quit
- # -- Update status without invoking any git commands.
+ # -- Update in memory status
#
set commit_type normal
set selected_commit_type new
set s $file_states($path)
set m [lindex $s 0]
switch -glob -- $m {
- DD -
- AO {set m __}
- A? -
- M? -
- D? {set m _[string index $m 1]}
- }
-
- if {$m eq {__}} {
+ _O -
+ _M -
+ _D {continue}
+ __ -
+ A_ -
+ M_ -
+ DD {
unset file_states($path)
catch {unset selected_paths($path)}
- } else {
- lset file_states($path) 0 $m
+ }
+ DO {
+ set file_states($path) [list _O [lindex $s 1] {} {}]
+ }
+ AM -
+ AD -
+ MM -
+ DM {
+ set file_states($path) [list \
+ _[string index $m 1] \
+ [lindex $s 1] \
+ [lindex $s 3] \
+ {}]
+ }
}
}
{AD o question "Added (but now gone)"}
{_D i question "Missing"}
- {D_ i removed "Removed by commit"}
{DD i removed "Removed by commit"}
{DO i removed "Removed (still exists)"}
+ {DM i removed "Removed (but modified)"}
{UM i merge "Merge conflicts"}
{U_ i merge "Merge conflicts"}
}
switch -glob -- [lindex $file_states($path) 0] {
A_ -
- AO -
M_ -
DD -
D_ {