From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Alex Riesen <alexander.riesen@cetitec.com>
Cc: Paul Mackerras <paulus@ozlabs.org>,
Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] gitk: add an option to run gitk on an item in the file list
Date: Wed, 9 May 2018 09:19:55 +0200 [thread overview]
Message-ID: <CAKPyHN1bGtCBZUh7cDAN-t+5DTutvyL6FLwynALTGZA5ijqwrA@mail.gmail.com> (raw)
In-Reply-To: <20180508133905.6jhhhp6l7avjkctl@pflmari>
On Tue, May 8, 2018 at 3:39 PM, Alex Riesen
<alexander.riesen@cetitec.com> wrote:
> Bert Wesarg, Tue, May 08, 2018 15:17:03 +0200:
>> On Tue, May 8, 2018 at 2:22 PM, Alex Riesen <alexander.riesen@cetitec.com> wrote:
>> > +proc flist_gitk {} {
>> > + global flist_menu_file findstring gdttype
>> > +
>> > + set x [shellquote $flist_menu_file]
>>
>> this needs to handle cdup, i.e., if gitk is run from a subdirectory,
>> all paths needs to be prefixed with $cdup, like: [file join $cdup
>> $flist_menu_file]
>
> That, indeed, is easily done:
>
> set x [shellquote [file join $cdup $flist_menu_file]]
> if {[file isdirectory $flist_menu_file]} {
> exec sh -c "cd $x&&gitk" &
> } else {
> exec gitk -- $x &
> }
>
>
> It just doesn't seem to work: gitk does not find any commits!
> Maybe that's because the file panel lists only files for the current
> subdirectory (without the path from the repo top-level)? E.g.
>
> mkdir tst
> cd tst
> git init
> mkdir a
> touch top-file a/sub-file
> git add -A ; git commit -m.
> cd a
> gitk
>
> Gitk lists only sub-file.
>
> Frankly, this listing limited to just a sub-directory confuses me a bit. Is
> there anyway to get to display full repository without changing to the top
> level?
I noticed that too, while testing your patch and I'm also confused.
But was not able to send a request to Paul yet. ls-tree --full-tree
seems to be one that should be used here, I think.
Bert
next prev parent reply other threads:[~2018-05-09 7:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 12:11 [PATCH 0/2] gitk: improve handling of submodules in the file list panel Alex Riesen
2018-05-08 12:22 ` [PATCH 1/2] gitk: show part of submodule log instead of empty pane when listing trees Alex Riesen
2018-05-08 17:07 ` Stefan Beller
2018-05-09 9:01 ` Alex Riesen
2018-05-08 12:22 ` [PATCH 2/2] gitk: add an option to run gitk on an item in the file list Alex Riesen
2018-05-08 13:17 ` Bert Wesarg
2018-05-08 13:39 ` Alex Riesen
2018-05-09 7:19 ` Bert Wesarg [this message]
2018-05-09 10:59 ` [PATCH] gitk: do not limit tree mode listing in the file list panel to current sub-directory Alex Riesen
2018-05-09 12:08 ` Bert Wesarg
2018-05-09 12:14 ` Alex Riesen
2018-05-09 12:35 ` [PATCH v2 0/2] gitk: improve handling of submodules in the file list panel Alex Riesen
2018-05-09 12:35 ` [PATCH v2 1/2] gitk: show part of submodule log instead of empty pane when listing trees Alex Riesen
2018-05-09 12:35 ` [PATCH v2 2/2] gitk: add an option to run gitk on an item in the file list Alex Riesen
2018-05-09 18:52 ` [PATCH v2 0/2] gitk: improve handling of submodules in the file list panel Stefan Beller
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=CAKPyHN1bGtCBZUh7cDAN-t+5DTutvyL6FLwynALTGZA5ijqwrA@mail.gmail.com \
--to=bert.wesarg@googlemail.com \
--cc=alexander.riesen@cetitec.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=paulus@ozlabs.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).