summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3b9dfde)
raw | patch | inline | side by side (parent: 3b9dfde)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 10 Sep 2007 00:38:05 +0000 (20:38 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 10 Sep 2007 00:39:47 +0000 (20:39 -0400) |
Oddly enough `git ls-files --others` supplies us the name of an
untracked submodule by including the trailing slash but that
same git version will not accept the name with a trailing slash
through `git update-index --stdin`. Stripping off that final
slash character before loading it into our file lists allows
git-gui to stage changes to submodules just like any other file.
This change should give git-gui users some basic submodule support,
but it is strictly at the plumbing level as we do not actually know
about calling the git-submodule porcelain that is a recent addition
to git 1.5.3.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
untracked submodule by including the trailing slash but that
same git version will not accept the name with a trailing slash
through `git update-index --stdin`. Stripping off that final
slash character before loading it into our file lists allows
git-gui to stage changes to submodules just like any other file.
This change should give git-gui users some basic submodule support,
but it is strictly at the plumbing level as we do not actually know
about calling the git-submodule porcelain that is a recent addition
to git 1.5.3.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 6d676097a6a3aeecfda3a752b7344dc88094956c..26eb5ac30947235c11490ea5d396809e9119bb71 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
set pck [split $buf_rlo "\0"]
set buf_rlo [lindex $pck end]
foreach p [lrange $pck 0 end-1] {
- merge_state [encoding convertfrom $p] ?O
+ set p [encoding convertfrom $p]
+ if {[string index $p end] eq {/}} {
+ set p [string range $p 0 end-1]
+ }
+ merge_state $p ?O
}
rescan_done $fd buf_rlo $after
}