Re: [PATCH v4 1/4] worktree: add per-worktree config files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 26, 2016 at 2:59 AM, Stefan Beller <sbeller@xxxxxxxxxx> wrote:
> I like the user facing design, but how am I supposed to use it internally?
>
> Say I want to read a value preferably from the worktree I'd do a
>     /*
>      * maybe I don't even have to set it to 1 as
>      * the user is supposed to do that?
>      */
>     repository_format_worktree_config = 1;
>     git_config_get_{string,bool,int} (... as usual ...)
>
> and if I want to read the value globally I would set the variable to 0
> and read? (I would need to restore it, so I'll have a temporary variable
> to keep the original value of repository_format_worktree_config)

I would understand if you need an api to write to worktree config or
the shared one. But choosing to _read_ from a specific source sounds
wrong. The common rule should apply everywhere: read from worktree
first, if not found, read again from shared config. Why do you need
this?
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]