summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-04-29 05:54:57 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-05-02 17:06:11 (GMT)
commitdc6716b83d3f90f8b1b2c611fe4f9f7c9fb14f5e (patch)
tree67904006dd5bc9a375dbcef59a10cb85a798bda5 /git-gui.sh
parent7416bbc65cbcc3db9cafe50b92c14193ac295dbe (diff)
downloadgit-dc6716b83d3f90f8b1b2c611fe4f9f7c9fb14f5e.zip
git-dc6716b83d3f90f8b1b2c611fe4f9f7c9fb14f5e.tar.gz
git-dc6716b83d3f90f8b1b2c611fe4f9f7c9fb14f5e.tar.bz2
git-gui: Refactor to use our git proc more often
Whenever we want to execute a git subcommand from the plumbing layer (and on rare occasion, the more porcelain-ish layer) we tend to use our proc wrapper, just to make the code slightly cleaner at the call sites. I wasn't doing that in a couple of places, so this is a simple cleanup to correct that. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 94f80bb..4c01b91 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1298,12 +1298,12 @@ A rescan will be automatically started now.
# -- Create the commit.
#
- set cmd [list git commit-tree $tree_id]
+ set cmd [list commit-tree $tree_id]
foreach p [concat $PARENT $MERGE_HEAD] {
lappend cmd -p $p
}
lappend cmd <$msg_p
- if {[catch {set cmt_id [eval exec $cmd]} err]} {
+ if {[catch {set cmt_id [eval git $cmd]} err]} {
error_popup "commit-tree failed:\n\n$err"
set ui_status_value {Commit failed.}
unlock_index
@@ -1323,8 +1323,9 @@ A rescan will be automatically started now.
set subject $msg
}
append reflogm {: } $subject
- set cmd [list git update-ref -m $reflogm HEAD $cmt_id $curHEAD]
- if {[catch {eval exec $cmd} err]} {
+ if {[catch {
+ git update-ref -m $reflogm HEAD $cmt_id $curHEAD
+ } err]} {
error_popup "update-ref failed:\n\n$err"
set ui_status_value {Commit failed.}
unlock_index
@@ -2018,13 +2019,13 @@ proc do_create_branch_action {w} {
-message "Invalid starting revision: $rev"
return
}
- set cmd [list git update-ref]
- lappend cmd -m
- lappend cmd "branch: Created from $rev"
- lappend cmd "refs/heads/$newbranch"
- lappend cmd $cmt
- lappend cmd $null_sha1
- if {[catch {eval exec $cmd} err]} {
+ if {[catch {
+ git update-ref \
+ -m "branch: Created from $rev" \
+ "refs/heads/$newbranch" \
+ $cmt \
+ $null_sha1
+ } err]} {
tk_messageBox \
-icon error \
-type ok \