Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Cornelius Weig
> > It may have been obvious, but to be explicit for somebody new, > !prefixcmp() corresponds to starts_with(). IOW, we changed the > meaning of the return value when moving from cmp-lookalike (where 0 > means "equal") to "does it start with this string?" bool (where 1 > means "yes"). > I see.

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> +enum log_refs_config { >> +LOG_REFS_UNSET = -1, >> +LOG_REFS_NONE = 0, >> +LOG_REFS_NORMAL, /* see should_create_reflog for rules */ >> +LOG_REFS_ALWAYS >> +}; >> +extern enum log_refs_config log_all_ref_updates; >> +... >> +int sh

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Junio C Hamano
Jeff King writes: > +enum log_refs_config { > + LOG_REFS_UNSET = -1, > + LOG_REFS_NONE = 0, > + LOG_REFS_NORMAL, /* see should_create_reflog for rules */ > + LOG_REFS_ALWAYS > +}; > +extern enum log_refs_config log_all_ref_updates; > +... > +int should_create_reflog(const char *re

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 10:21:48PM +0100, Cornelius Weig wrote: > On 01/25/2017 07:00 PM, Jeff King wrote: > > > - Is that the end of it, or is the desire really "I want reflogs for > > _everything_"? That seems like a sane thing to want. > > > > If so, then the update to core.logallre

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Cornelius Weig
On 01/25/2017 07:00 PM, Jeff King wrote: > - Is that the end of it, or is the desire really "I want reflogs for > _everything_"? That seems like a sane thing to want. > > If so, then the update to core.logallrefupdates should turn it into > a tri-state: > > - false; no reflog

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Junio C Hamano
Jeff King writes: > I made a lot of suppositions about your desires there, so maybe you > really do want just tag.createReflog. But "core.logallrefupdates = > always" sounds a lot more useful to me. Thanks for saving me from typing exactly the same thing ;-)

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 01:19:06AM +0100, cornelius.w...@tngtech.com wrote: > From: Cornelius Weig > > Git does not create a history for tags, in contrast to common > expectation to simply version everything. This can be changed by using > the `--create-reflog` flag when creating the tag. Howeve

Re: [PATCH] tag: add tag.createReflog option

2017-01-24 Thread Pranit Bauva
Hey Cornelius, On Wed, Jan 25, 2017 at 5:49 AM, wrote: > From: Cornelius Weig > > Git does not create a history for tags, in contrast to common > expectation to simply version everything. This can be changed by using > the `--create-reflog` flag when creating the tag. However, a config > option

[PATCH] tag: add tag.createReflog option

2017-01-24 Thread cornelius . weig
From: Cornelius Weig Git does not create a history for tags, in contrast to common expectation to simply version everything. This can be changed by using the `--create-reflog` flag when creating the tag. However, a config option to enable this behavior by default is missing. This commit adds the