All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] git-gui: fix browser with initial path
Date: Fri, 28 Jan 2011 10:42:15 +0000	[thread overview]
Message-ID: <87sjwdmhrs.fsf@fox.patthoyts.tk> (raw)
In-Reply-To: <AANLkTim8BhN9czr6Jx5J28iNop4XdFDcNKbbjxddW9-i@mail.gmail.com> (Bert Wesarg's message of "Fri, 10 Dec 2010 09:48:43 +0100")

Bert Wesarg <bert.wesarg@googlemail.com> writes:

>Ping.
>
>On Tue, Nov 23, 2010 at 08:37, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
>> The path given to the browser does not end in a slash, which results in bad
>> path given to blame and broke [Up To Parent]. Also the path was not
>> escaped before displaying.
>>
>> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>>
>> ---
>>  git-gui/lib/browser.tcl |    8 +++++++-
>>  1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/git-gui/lib/browser.tcl b/git-gui/lib/browser.tcl
>> index c241572..a88a68b 100644
>> --- a/git-gui/lib/browser.tcl
>> +++ b/git-gui/lib/browser.tcl
>> @@ -26,8 +26,14 @@ constructor new {commit {path {}}} {
>>        wm withdraw $top
>>        wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]]
>>
>> +       if {$path ne {}} {
>> +               if {[string index $path end] ne {/}} {
>> +                       append path /
>> +               }
>> +       }
>> +
>>        set browser_commit $commit
>> -       set browser_path $browser_commit:$path
>> +       set browser_path "$browser_commit:[escape_path $path]"
>>
>>        ${NS}::label $w.path \
>>                -textvariable @browser_path \
>> --
>> tg: (6f10c41..) bw/git-gui/fix-browser-up (depends on: master)
>>
>
The commit comment for this doesn't really reflect whats being
done. Commit 1ab8628 fixed the [Up To Parent] problem and this just
fixes the display on the browser title.

So I plan to take this with the commit comment as:

 git-gui: fix display of path in browser title

 Ensure the browser path is shown on the title with a / suffix and escape
 any backslashes or newlines in path elements before display.

 Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

  reply	other threads:[~2011-01-28 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23  7:37 [PATCH] git-gui: fix browser with initial path Bert Wesarg
2010-12-10  8:48 ` Bert Wesarg
2011-01-28 10:42   ` Pat Thoyts [this message]
2011-01-28 11:04     ` Bert Wesarg

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

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

  git send-email \
    --in-reply-to=87sjwdmhrs.fsf@fox.patthoyts.tk \
    --to=patthoyts@users.sourceforge.net \
    --cc=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.