Subject: Re: can't use gitk

From: Andreas Ericsson <[email-masked]>
Date: Wed, 20 Aug 2008 11:31:28 +0200

Xin Yang wrote:
> Hi Andreas Ericsson,

Hi Sissia. I forwarded your email to the git list ([email-masked])
where you can hope someone will have the time and knowledge to help you.
I'm no gitk or TCL expert, so I wouldn't even know where to start.

For future reference though:
When you want help with an opensource tool you should look for its
mailing list before firing off mails to individual contributors. Mostly
all of us work with opensource on our spare time and we, as individuals,
hardly ever have neither time nor inclination to answer questions in
private. When you ask to the mailing list, the question and the answer
gets stored for all the world to see in the mailing list archives, so
that people in the future with the same problems you have can find it
without anyone having to actually spend time on answering it again.

For a more exhaustive read on that topic, see
http://catb.org/~esr/faqs/smart-questions.html. It holds an abundance
of information valuable to those who need answers for free and gratis.

> I got your name from git archives but I still can't sue gitk. I guess
> there are some environment setup issues.
> Could you give me some clues?
> 
> The GIT version I installed is:
> git-1.5.3.2.tar.bz2<http://download.chinaunix.net/download.php?id=25039&ResourceID=3744>
> 
> The error info I got after running gitk is:
> Error in startup script: syntax error in expression "$i >= [llength $argv]
> && $revtreeargs ne {}"
>     while executing
> "if {$i >= [llength $argv] && $revtreeargs ne {}} {
>     # no -- on command line, but some arguments (other than -d)
>     if {[catch {
>         set f [eval exec ..."
>     (file "/apps/mds_lrt/git/bin/gitk" line 7912)
> 
> Here is code beginning from line 7912:
> if {$i >= [llength $argv] && $revtreeargs ne {}} {
>     # no -- on command line, but some arguments (other than -d)
>     if {[catch {
>         set f [eval exec git rev-parse --no-revs --no-flags $revtreeargs]
>         set cmdline_files [split $f "\n"]
>         set n [llength $cmdline_files]
>         set revtreeargs [lrange $revtreeargs 0 end-$n]
>         # Unfortunately git rev-parse doesn't produce an error when
>         # something is both a revision and a filename.  To be consistent
>         # with git log and git rev-list, check revtreeargs for filenames.
>         foreach arg $revtreeargs {
>             if {[file exists $arg]} {
>                 show_error {} . "Ambiguous argument '$arg': both revision\
>                                  and filename"
>                 exit 1
>             }
>         }
>     } err]} {
>         # unfortunately we get both stdout and stderr in $err,
>         # so look for "fatal:".
>         set i [string first "fatal:" $err]
>         if {$i > 0} {
>             set err [string range $err [expr {$i + 6}] end]
>         }
>         show_error {} . "Bad arguments to gitk:\n$err"
>         exit 1
>     }
> }
> 
> 
> 
> 
> I am looking forward to your reply. :) Thanks a lot.
> 
> Sissia
> 

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231