login
Header Space

 
 

Re: [PATCH] git-gui: offer a list of recent repositories on startup

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Shawn O. Pearce <spearce@...>
Cc: <git@...>, <msysgit@...>
Date: Monday, October 8, 2007 - 10:16 am

Shawn,
I attached two patches. They should eventually be both squashed into  
one.
You can also cherry pick them from work/setup-preview in 4msysgit.
I'm not yet fully convinced of the performance of the second patch.
It is far from optimal, although it might be sufficient.

If you're satisfied with the current implementation you can squash them
into a single commit; or ask me to do that.

More comments below, after the summary.


commit a483fdd562d6c44d68a998224e0bbb17933b624a
Author: Steffen Prohaska <prohaska@zib.de>
Date:   Mon Oct 8 08:25:47 2007 +0200

     git-gui: offer a list of recent repositories on startup

     If git-gui is started outside a work tree the repository
     chooser will offer a list of recently opend repositories.
     Clicking on an entry directly opens the repository.

     The list of recently opened repositories is stored in the
     config as gui.recentrepos. If the list grows beyond 10
     entries it will be truncated.

     Note, only repositories that are opened through the
     repository chooser will get added to the recent list.
     Repositories opened from the shell will not yet be added.

     Signed-off-by: Steffen Prohaska <prohaska@zib.de>

commit a9f083e83717eef91ba8842ece4a3ec0824126af
Author: Steffen Prohaska <prohaska@zib.de>
Date:   Mon Oct 8 08:14:34 2007 +0200

     git-gui: handle list of recent repos as multi config gui.recentrepo

     Instead of encoding the list of recently opened repositories
     in a single config line, this commit uses multiple lines of
     gui.recentrepo.

     An advantage is that the solution makes the list explicit
     on the git config level. This may be easier to understand
     if the user wants to look at the configuration.

     A disadvantage (of the current implementation) is that it
     requires more git config calls to manage the list. This could
     be optimized. But maybe not required because the list is only
     updated on opening a new repository, which is already a quite
     expensive operation.

     Signed-off-by: Steffen Prohaska <prohaska@zib.de>


On Oct 8, 2007, at 1:30 AM, Shawn O. Pearce wrote:


changed in first patch.


changed in first patch.



I don't think " is allowed. I wasn't able to create a file containing
" in its path. Neither from the explorer nor on the command line.



The second patch actually runs git config several times to first
remote all multi-value entries and then create them one by one. This
is worse performance than before.

This could be avoided by selectively removing only a single entry.
'git config' could be asked to only remove the entry that was removed
from the tcl list. But 'git config' only accepts regular expression
to do so.

I don't know how to escape a simple string to a corresponding
regular expression that matches only the string but nothing else.

For my problem it would be much easier if 'git config' accepted just
a plain string that must be matched exactly and not a regular  
expression.

I see two solutions:
1) Someone explains me how to convert a string to a regular expression
matching only the input string.

2) "git config" is modified to accept a simple string as its second  
argument.
Maybe we can use implementation in the second patch for now and wait
until "git config" is modified. Note, I'll not start to work on this  
right
away because I want to stay focused on the basic functionality on  
Windows and,
for now, do not care about performance too much.

	Steffen
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] git-gui: offer a list of recent repositories on ..., Steffen Prohaska, (Mon Oct 8, 10:16 am)
Re: [msysGit] Re: [PATCH] git-gui: offer a list of recent re..., Johannes Schindelin, (Tue Oct 9, 7:43 am)
Re: [msysGit] Re: [PATCH] git-gui: offer a list of recent re..., Johannes Schindelin, (Wed Oct 10, 11:43 am)
speck-geostationary