git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* overriding/removing inherited credential.helper
@ 2012-11-10 15:12 乙酸鋰
  2013-02-07 14:36 ` overriding/removing inherited credential.helper, Do not add an empty value from config credential.helper Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: 乙酸鋰 @ 2012-11-10 15:12 UTC (permalink / raw)
  To: git

In credential.c, line 67:

    if (!strcmp(key, "helper"))
        string_list_append(&c->helpers, value);

In global config, I add one credential helper.
But I do not want to use any credential helper in a specific repository.
Currently there is no way in local config to override and remove
inherited credential helper.
Of course, I do not want to change global config.

Could you suggest a patch?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: overriding/removing inherited credential.helper, Do not add an empty value from config credential.helper
  2012-11-10 15:12 overriding/removing inherited credential.helper 乙酸鋰
@ 2013-02-07 14:36 ` Ted Zlatanov
  2013-02-07 18:23   ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2013-02-07 14:36 UTC (permalink / raw)
  To: 乙酸鋰; +Cc: git

On Sat, 10 Nov 2012 23:12:50 +0800 乙酸鋰 <ch3cooli@gmail.com> wrote: 

> In credential.c, line 67:
>     if (!strcmp(key, "helper"))
>	  string_list_append(&c->helpers, value);

> In global config, I add one credential helper.
> But I do not want to use any credential helper in a specific repository.
> Currently there is no way in local config to override and remove
> inherited credential helper.
> Of course, I do not want to change global config.

> Could you suggest a patch?

On Sat, 10 Nov 2012 23:08:04 +0800 乙酸鋰 <ch3cooli@gmail.com> wrote: 

> Below is current git message when a local config credential.helper has
> an empty value. Please skip an empty value.

> $ git push --force origin master
> git: 'credential-' is not a git command. See 'git --help'.

> Did you mean this?
>	  credential
> Total 0 (delta 0), reused 0 (delta 0)
> To https://user@github.com/user/myrepo.git
>  + d23aa6a...3405990 master -> master (forced update)

I would like that too (needed it today).  Maybe the empty string (as
suggested) or "none" could be acceptable.

"none" seems friendlier and is very unlikely to collide with an actual
credential helper.

Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: overriding/removing inherited credential.helper, Do not add an empty value from config credential.helper
  2013-02-07 14:36 ` overriding/removing inherited credential.helper, Do not add an empty value from config credential.helper Ted Zlatanov
@ 2013-02-07 18:23   ` Junio C Hamano
  2013-02-07 18:38     ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-02-07 18:23 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: 乙酸鋰, git

Ted Zlatanov <tzz@lifelogs.com> writes:

>> Below is current git message when a local config credential.helper has
>> an empty value. Please skip an empty value.
>
>> $ git push --force origin master
>> git: 'credential-' is not a git command. See 'git --help'.
>> Did you mean this?
>>	  credential

Why isn't "do not add empty string, or any random string that ends
up referring to a helper that you do not have" a solution?

>> Total 0 (delta 0), reused 0 (delta 0)
>> To https://user@github.com/user/myrepo.git
>>  + d23aa6a...3405990 master -> master (forced update)
>
> I would like that too (needed it today).  Maybe the empty string (as
> suggested) or "none" could be acceptable.

Whatever you do, I do not think introducing a per-variable hack

	[credential]
        	helper = none ;# or "helper = clear"
                helper = mine ;# this is the only thing I use

like that is a sane way to go.  "Clear everything you saw so far"
would be useful for variables other than "credential.helper";
shouldn't it be done by adding a general syntax to the configuration
file format and teach the configuration parser to clear the
cumulative definitions so far?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: overriding/removing inherited credential.helper, Do not add an empty value from config credential.helper
  2013-02-07 18:23   ` Junio C Hamano
@ 2013-02-07 18:38     ` Ted Zlatanov
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2013-02-07 18:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: 乙酸鋰, git

On Thu, 07 Feb 2013 10:23:20 -0800 Junio C Hamano <gitster@pobox.com> wrote: 

JCH> "Clear everything you saw so far" would be useful for variables
JCH> other than "credential.helper"; shouldn't it be done by adding a
JCH> general syntax to the configuration file format and teach the
JCH> configuration parser to clear the cumulative definitions so far?

That's a question for the configuration parser, right?  I don't have an
informed opinion on how it should be implemented, and am OK with any
syntax to clear a variable.

Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-07 18:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-10 15:12 overriding/removing inherited credential.helper 乙酸鋰
2013-02-07 14:36 ` overriding/removing inherited credential.helper, Do not add an empty value from config credential.helper Ted Zlatanov
2013-02-07 18:23   ` Junio C Hamano
2013-02-07 18:38     ` Ted Zlatanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).