git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v3 0/4] git gui: allow for a long recentrepo list
@ 2017-01-22 19:52 Philip Oakley
  2017-01-22 19:52 ` [PATCH v3 1/4] git-gui: remove duplicate entries from .gitconfig's gui.recentrepo Philip Oakley
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Philip Oakley @ 2017-01-22 19:52 UTC (permalink / raw)
  To: GitList
  Cc: Self, Junio C Hamano, Pat Thoyts, Eric Sunshine, Alexey Astakhov,
	Johannes Schindelin

Way back in December 2015 I made a couple of attempts to patch up
the git-gui's recentrepo list in the face of duplicate entries in
the .gitconfig

The series end at http://public-inbox.org/git/9731888BD4C348F5BFC82FA96D978034@PhilipOakley/

A similar problem was reported recently on the Git for Windows list
https://github.com/git-for-windows/git/issues/1014 were a full
recentrepo list also stopped the gui working.

This series applies to Pat Thoyt's upstream Github repo as a merge
ready Pull Request https://github.com/patthoyts/git-gui/pull/10.
Hence if applied here it should be into the sub-tree git/git-gui.

I believe I've covered the points raised by Junio in the last review
and allowed for cases where the recentrepo list is now longer than the
maximum (which can be configured, both up and down).

I've cc'd just the cover letter to those involved previously, rather
than the series to avoid spamming.

There are various other low hanging fruit that the eager could look at
which are detailed at the end of the GfW/issues/104 referenced above.

Philip Oakley (4):
  git-gui: remove duplicate entries from .gitconfig's gui.recentrepo
  git gui: cope with duplicates in _get_recentrepo
  git gui: de-dup selected repo from recentrepo history
  git gui: allow for a long recentrepo list

 lib/choose_repository.tcl | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

-- 
2.9.0.windows.1.323.g0305acf
---
cc: Junio C Hamano <gitster@pobox.com>
cc: Pat Thoyts <patthoyts@users.sourceforge.net>,
cc: Eric Sunshine <sunshine@sunshineco.com>,
cc: Alexey Astakhov <asstv7@gmail.com>
cc: Johannes Schindelin <johannes.schindelin@gmx.de>


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH v2 4/4] git gui: allow for a long recentrepo list
@ 2015-12-17 22:11 Philip Oakley
  2015-12-17 22:40 ` [PATCH v3 " Philip Oakley
  0 siblings, 1 reply; 9+ messages in thread
From: Philip Oakley @ 2015-12-17 22:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GitList, Eric Sunshine, Pat Thoyts, Alexey Astakhov

From: "Philip Oakley" <philipoakley@iee.org>
> From: "Junio C Hamano" <gitster@pobox.com>, December 17, 2015 7:32 PM
>> Philip Oakley <philipoakley@iee.org> writes:
>>
>>> The gui.recentrepo list may be longer than the maxrecent setting.
>>> Allow extra space to show any extra entries.
>>>
>>> In an ideal world, the git gui would limit the number of entries
>>> to the maxrecent setting, however the recentrepo config list may
>>> have been extended outside of the gui, or the maxrecent setting changed
>>> to a reduced value. Further, when testing the gui's recentrepo
>>> logic it is useful to show these extra, but valid, entries.
>>
>> I do not have a strong objection either way, but the magic number 5
>> smells like an indication that this is solving a wrong problem or
>> solving a problem in a wrong approach.  What happens to the entries
>> beyond $maxrecent-th in the recent list with the current code?  The
>> list effectively truncated and not shown?  Wouldn't the same thing
>> happen to the entries beyond ($maxrecent+5)-th in the recent list
>> with your patch?
>
> True, it was a magic number selected as being a moderate overspill 
> allowance.
> I tried 3 and 5 as possible values, and 5 didn't look ungainly, even on my 
> small netbook, and covered all my test hacking cases.
>
> The issue was that the prior code assumed that the fault could never 
> happen and limited the display, which is sorted, to the max value, so in a 
> fault condition the most recent repo could fall off the bottom.
>
> As a bit of 'monkey patching' I wasn't sure how the dialog creation could 
> know in advance how long the list would be, so I simply added on a small 
> margin.
>
>>
>> Truncating the list at $maxrecent-th to match the display
>> (i.e. declare that "$maxrecent" is really the max number of entries
>> we would keep track of), or allowing the UI to scroll so that
>> entries beyond $maxrecent-th one can be shown, perhaps?
>
> This would certainly be a reasonable approach, but I don't know enough of 
> the tcl to know how to make it happen. If anyone has suggestions...

I think I see the way to do it. V3 Patch 4/4 to follow.
>
>>
>>>
>>> Signed-off-by: Philip Oakley <philipoakley@iee.org>
>>> ---
>>> word usage corrected.
>>> Eric's comments $gmane/282432
>>> ---
>>>  git-gui/lib/choose_repository.tcl | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/git-gui/lib/choose_repository.tcl 
>>> b/git-gui/lib/choose_repository.tcl
>>> index ad7a888..a08ed4f 100644
>>> --- a/git-gui/lib/choose_repository.tcl
>>> +++ b/git-gui/lib/choose_repository.tcl
>>> @@ -153,7 +153,7 @@ constructor pick {} {
>>>  -background [get_bg_color $w_body.recentlabel] \
>>>  -wrap none \
>>>  -width 50 \
>>> - -height $maxrecent
>>> + -height [expr {$maxrecent + 5}]
>>>  $w_recentlist tag conf link \
>>>  -foreground blue \
>>>  -underline 1
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-02-11 12:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-22 19:52 [PATCH v3 0/4] git gui: allow for a long recentrepo list Philip Oakley
2017-01-22 19:52 ` [PATCH v3 1/4] git-gui: remove duplicate entries from .gitconfig's gui.recentrepo Philip Oakley
2017-01-22 19:52 ` [PATCH v3 2/4] git gui: cope with duplicates in _get_recentrepo Philip Oakley
2017-01-22 19:53 ` [PATCH v3 3/4] git gui: de-dup selected repo from recentrepo history Philip Oakley
2017-01-22 19:53 ` [PATCH v3 4/4] git gui: allow for a long recentrepo list Philip Oakley
2017-02-11 12:48 ` [PATCH v3 0/4] " Philip Oakley
  -- strict thread matches above, loose matches on Subject: below --
2015-12-17 22:11 [PATCH v2 4/4] " Philip Oakley
2015-12-17 22:40 ` [PATCH v3 " Philip Oakley
2015-12-17 23:29   ` Junio C Hamano
2015-12-18  0:26     ` Philip Oakley

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).