Re: [PATCH 5/7] gitk: Make cherry-pick call git-citool on conflicts.
- From
Paul Mackerras <paulus@samba.org>
- Date
- Oct 9, 2008, 10:57 UTC
- Message-ID
- <18669.58277.929130.165032@cargo.ozlabs.ibm.com>
- In-Reply-To
- <bb6f213e0810090124i62a51e92n45836ee02577331a@mail.gmail.com>
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 envset 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.