git/list[1] front-page[2] threads[3] people[4] search[5] about
 

The latest commit to add new keybindings

From
Junio C Hamano <junkio@cox.net>
Date
Sep 24, 2005, 01:31 UTC
Message-ID
<7v4q8b8d5j.fsf@assigned-by-dhcp.cox.net>

Paul, I was looking at the gitk repository thinking it's about time for me to slurp your changes in, and have two questions.

The 'new keybindings' commit from Robert Suetterlin changes the beginning of gitk to:

        --- a/gitk
        +++ b/gitk
        @@ -1,6 +1,6 @@
         #!/bin/sh
         # Tcl ignores the next line -*- tcl -*- \
        -exec wish "$0" -- "${1+$@}"
        +exec wish8.4 "$0" -- "${1+$@}"

Do you actually require 8.4, or any reasonably recent wish would do? The reason I ask is that Debian side (debian/control) explicitly depends on 'tk8.4' but RPM side (git-core.spec.in) just says 'tk'. I could change the RPM side to also require 8.4 but I do not have ready access to any RPM machine to test it with, so if that is not needed I'd rather not touch spec.in file.

Another thing, which is unrelated to Robert's change, is that I suspect the exec command line should be like either one of these (the first one is probably more old-fashioned):

	exec wish "$0" -- ${1+"$@"}
	exec wish "$0" -- "$@"

With "${1+$@}", you are passing an empty parameter after '--' when gitk itself receives no parameter. Maybe it is intended, maybe not...

prompt$ cat >one.sh <<\EOF
#!/bin/sh
exec ./two.sh "$0" -- "${1+$@}"
EOF
prompt$ cat >two.sh <<\EOF
#!/bin/sh
echo "\$0 is $0"
echo "\$# is $#"
i=1
for a
do
	echo "\$$i is $a"
	i=`expr $i + 1`
done
EOF
prompt$ chmod +x one.sh two.sh
prompt$ ./one.sh foo
$0 is /var/tmp/gomi/two.sh
$# is 3
$1 is <./one.sh>
$2 is <-->
$3 is <foo>
prompt$ ./one.sh
$0 is /var/tmp/gomi/two.sh
$# is 3
$1 is <./one.sh>
$2 is <-->
$3 is <>
prompt$ exit
Next: Paul Mackerras
Message 1 of 4 in “The latest commit to add new keybindings”
  1. Junio C HamanoSep 24, 2005
  2. Paul MackerrasSep 26, 2005
  3. H. Peter AnvinSep 26, 2005
  4. Junio C HamanoSep 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.