git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
From: Pratyush Yadav <me@yadavpratyush.com>
To: Philip Oakley <philipoakley@iee.email>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Git Gui: Branch->create currently fails...
Date: Tue, 8 Oct 2019 05:30:03 +0530
Message-ID: <20191008000003.qlulu5ie36eij4uq@yadavpratyush.com> (raw)
In-Reply-To: <bfe78474-0eb9-fc5e-1371-3b055308169a@iee.email>

On 07/10/19 11:02PM, Philip Oakley wrote:
> I'd never used the Branch:Create before (this is via mouse) and it threw an
> error, which appears to be repeatable, so I'm reporting it at the moment so

I'm afraid I can't reproduce it. I tested by creating a worktree of 
git.git by running:

  git worktree add ../git-2

Then I opened git-gui in the worktree and clicked the "Create" option 
under the "Branch" menu.

The dialog opened just fine, which I assume is what your error is. But 
just to be sure, I created a branch too, and that also works pretty 
well.

Same behaviour with a "normal" branch, which is not inside a worktree.

So is there anything else in your setup that would cause this problem?

> I don't forget ...
> (I'm chasing down other issue at the moment ;-)
> 
> This is with the version 0.21.GI git version 2.23.0.windows.1 Tcl/Tck 8.6.9
> 
> 
> missing "
> missing "
>     while executing
> "list "refs/heads/redo-v0" [list ""
>     ("eval" body line 1)
>     invoked from within
> "eval $line"
>     (procedure "_new" line 87)
>     invoked from within
> "_new $path 0 $title"
>     (procedure "::choose_rev::new" line 2)
>     invoked from within
> "::choose_rev::new $w.rev [mc "Starting Revision"]"
>     (procedure "branch_create::dialog" line 35)
>     invoked from within
> "branch_create::dialog"
>     (menu invoke)

Looking at the log, the culprit seems to be the line:

  set line [eval $line]

over at lib/choose_rev.tcl:159. The $line comes from reading the output 
of a call to `git for-each-ref` with '--tcl' passed in. Looking at the 
man page for 'for-each-ref', the description of the option is:

  --shell, --perl, --python, --tcl
    If given, strings that substitute %(fieldname) placeholders are 
    quoted as string literals suitable for the specified host language. 
    This is meant to produce a scriptlet that
    can directly be `eval`ed.

So this might possibly me an upstream bug.

If I had to guess a fix, I'd suggest trying to wrap the $line in 
lib/choose_rev.tcl:159 in quotes like so:

  set line [eval "$line"] 

If this doesn't fix it, see if you can find out which $line is causing 
problem by printing the variable before 'eval'ing it by adding a:

  puts "$line"

before the call to eval.

-- 
Regards,
Pratyush Yadav

  parent reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 22:02 Philip Oakley
2019-10-07 22:05 ` Philip Oakley
2019-10-08  0:00 ` Pratyush Yadav [this message]
2019-10-12 20:34   ` Philip Oakley
2019-10-13 18:50     ` Pratyush Yadav
2019-10-14 12:45       ` Philip Oakley
2019-10-14 17:57         ` Pratyush Yadav
2019-10-14 22:11           ` Philip Oakley
2019-10-16 18:52             ` Pratyush Yadav
2019-10-18 21:05               ` Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191008000003.qlulu5ie36eij4uq@yadavpratyush.com \
    --to=me@yadavpratyush.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.email \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git