From: Paul Mackerras Date: Thu, 09 Oct 2008 10:57:41 GMT Subject: Re: [PATCH 5/7] gitk: Make cherry-pick call git-citool on conflicts. Message-ID: <18669.58277.929130.165032@cargo.ozlabs.ibm.com> In-Reply-To: Alexander Gavrilov writes: > If I understand correctly, using a shell would require composing the > command as a string, which itself requires quoting the author name & email, > and other argument strings. I did not feel confident enough to do that, so > chose a dumb but safe solution. You're right. I think we should do it basically the way you suggest, but the saving/restoring of the environment can be done a bit more concisely like this: proc exec_citool {args {baseid {}}} { global commitinfo env set save_env [array get env GIT_AUTHOR_*] if {$baseid ne {}} { # as before ... } eval exec git citool $args & catch {array unset env GIT_AUTHOR_*} array set env $save_env } > I'm more used to languages where lists and strings are very different types... > Even in perl you have to use [] for an empty list ref, and '' for an > empty string. In Tcl, everything is a string. :) Paul.