git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-instaweb: Add option to reuse previous config file

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 1, 2010, 21:31 UTC
Message-ID
<201006012331.37871.jnareb@gmail.com>
In-Reply-To
<AANLkTinmDi-4nZm9x81FlDbp9mJMLoWmom2qUKnSLIrZ@mail.gmail.com>
Pavan Kumar Sunkara wrote:
Show 16 quoted lines
> 2010/6/2 Jakub Narebski <jnareb@gmail.com>
> 
> > On Tue, 1 June 2010, Pavan Kumar Sunkara wrote:
> >
> > > Add an option to git-instaweb which allows the usage of the old
> > > gitweb_config.perl situated in '.git/gitweb' dir. When the option
> > > is in use, gitweb_conf() won't be used and thus the gitweb_config.perl
> > > won't be overwritten.
> >
> > I think that the correct solution would be to avoid overwriting
> > (customized) git-instaweb's gitweb_config.perl, but to generate it if
> > it does not exist.
> 
> So, you say that there is no use of this option ?
> Well, what happens if someone want's to overwrite their 
> gitweb_config.perl?
No, I am not saying that.

If git-instaweb is invoked *without* --reuse-config, the gitweb_config.perl would be regenerated whether it exists or not, overwriting your changes.

If git-instaweb is invoked *with* --reuse-config, the gitweb_config.perl would be generated if it does not exist (so if you delete gitweb_config.perl and then run 'git instaweb --reuse-config' it would not fail), and reused if it does exist.

  test "$no_reuse" = true || test ! -e "$GITWEB_CONFIG" && gitweb_conf

or something like that (the test if $GITWEB_CONFIG file exists might be moved to the fragment of code that sets no_reuse to true instead).

-- 
Jakub Narebski
Poland
Previous: Pavan Kumar SunkaraNext: Petr Baudis
Message 4 of 5 in “git-instaweb: Add option to reuse previous config file”
  1. git-instaweb: Add option to reuse previous config filePavan Kumar Sunkara, Jun 1, 2010
  2. Jakub NarebskiJun 1, 2010
  3. Pavan Kumar SunkaraJun 1, 2010
  4. Jakub NarebskiJun 1, 2010
  5. Petr BaudisJun 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.