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

Re: [PATCH] gitk: read and write a repository specific configuration file

From
Lukasz Stelmach <stlman@poczta.fm>
Date
Dec 4, 2012, 20:12 UTC
Message-ID
<50BE5935.4040809@poczta.fm>
In-Reply-To
<1kujrnc.1r4khfkkpdoo1M%lists@haller-berlin.de>
W dniu 03.12.2012 22:15, Stefan Haller pisze:
Show 9 quoted lines
> Lukasz Stelmach <stlman@poczta.fm> wrote:
> 
>> Enable gitk read and write repository specific configuration
>> file: ".git/k" if the file exists. To make gitk use the local
>> file simply create one, e.g. with the touch(1) command.
> 
> I'm not sure I like this proposal. While it may be desirable to have
> *some* settings stored per repository, for most settings I want them to
> be remembered globally.

The way it works with my patch, gitk reads global settings from ~/.gitk. So you can treat it as a template. Then, when you exit it saves to local file if it exists. This of course means you can't override settings from ./.git/k with something from ~/.gitk by simply choosing to on GUI. However, it takes no more than removing appropriate line from .git/k to get the value from ~/.gitk.

IMHO this is a reasonable compromise which is available at no cost as far as data structure complexity is concerned. Choosing where to save what would require a bit of information per configuration variable. With a mask saved locally surprises may come when you change a variable, forget to localise it and it pops in a different repository. My approach, however simplistic, avoids this particular pitfall.

Show 9 quoted lines
> Git-gui tries to solve this by presenting two panes in the preferences
> dialog, so that I can choose the scope of every setting I change. This
> still doesn't help for things that are remembered implicitly, like the
> window size.
> 
> I don't have good suggestions how to solve this; just pointing out
> problems.
> 
> 
-- 
Było mi bardzo miło.               Czwarta pospolita klęska, [...]
>Łukasz<                 Już nie katolicka lecz złodziejska.  (c)PP
Previous: Stefan HallerNext: Łukasz Stelmach
Message 6 of 18 in “gitk: add a checkbox to control the visibility of tags”
  1. gitk: add a checkbox to control the visibility of tagsŁukasz Stelmach, Nov 30, 2012
  2. Junio C HamanoDec 2, 2012
  3. Lukasz StelmachDec 2, 2012
  4. gitk: read and write a repository specific configuration fileŁukasz Stelmach, Dec 2, 2012
  5. Stefan HallerDec 3, 2012
  6. Lukasz StelmachDec 4, 2012
  7. gitk: read and write a repository specific configuration fileŁukasz Stelmach, Dec 5, 2012
  8. Marc BranchaudDec 5, 2012
  9. gitk: read and write a repository specific configuration fileŁukasz Stelmach, Dec 8, 2012
  10. Junio C HamanoDec 9, 2012
  11. Paul MackerrasDec 9, 2012
  12. Lukasz StelmachDec 9, 2012
  13. Lukasz StelmachDec 9, 2012
  14. Felipe ContrerasDec 2, 2012
  15. Paul MackerrasJan 2, 2013
  16. Junio C HamanoJan 2, 2013
  17. Lukasz StelmachJan 2, 2013
  18. Junio C HamanoJan 2, 2013

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.