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
Junio C Hamano <gitster@pobox.com>
Date
Dec 9, 2012, 09:18 UTC
Message-ID
<7vd2yjeg8f.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1354966067-2865-1-git-send-email-stlman@poczta.fm>
Łukasz Stelmach <stlman@poczta.fm> writes:
Show 7 quoted lines
> 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.
>
> This is very useful if one uses different views for different
> repositories. Now there is no need to store all of them in
> ~/.gitk and make the views list needlessly long.

I do not use gitk heavily myself, but I have a mixed feeling about this patch.

Forking the configuration from the one true ~/.gitk is easy; it is just the matter of copying it to repository specific location. Once forked, however, it is very hard to merge these configuration files sprinkled across repositories back, or more importantly, change the settings globally. Imagine you just got a new monitor that is a lot finer grained than the one you have been usingq, and your choice of font size has been specified in terms of pixels; you would want to show all gitk windows in larger font now, regardless of the repository, but you now have to go to 47 different configuration files and update them.

So I suspect that this may introduce more trouble than it is worth for users and should not be sold with a "This is very useful" label. At best, it is "This may be useful"; otherwise the feature may end up harming our users. I'd phrase it without judging if it is good or bad for the users, perhaps like this:

    This allows one to specify different views for different
    repositories.

In any case, the filename .git/k may be _cute_, but I do not think we would want to see:

    $ ls .git
    branches        config       HEAD   index  k     objects
    COMMIT_EDITMSG  description  hooks  info   logs  refs

It is too cryptic, unless the user _knows_ 'k' is for gitk. I'd call it $GIT_DIR/gitkconfig or something, if I were supportive for this feature (which I am not enthusiastic, yet).

Thanks.
Previous: Łukasz StelmachNext: Paul Mackerras
Message 10 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.