On Sun, May 12, 2013 at 05:23:15PM +0700, Duy Nguyen wrote:
> On Sun, May 12, 2013 at 3:20 AM, Heiko Voigt <[email protected]> wrote:
> > Since ages we do not care about our program enough. Lets not treat them
> > as slaves anymore and say please.
> >
> > Signed-off-by: Heiko Voigt <[email protected]>
> > Signed-off-by: Jonathan Nieder <[email protected]>
> > Signed-off-by: Jens Lehmann <[email protected]>
> > Signed-off-by: Thomas Rast <[email protected]>
> > Signed-off-by: Johan Herland <[email protected]>
>
> A product of Git Berlin Meetup?
Yep :-)
> > +static void check_politeness(const char *cmd)
> > +{
> > + const char *user_config;
> > + struct strbuf buf = STRBUF_INIT;
> > +
> > + if (getenv("GIT_POLITENESS_CHECK_PASSED"))
> > + return;
> > +
> > + setenv("GIT_POLITENESS_CHECK_PASSED", "Yes", 1);
> > +
> > + git_config_early(read_polite_counter, NULL, NULL);
> > + if (!strcmp(cmd, "please")) {
> > + impolite_counter = 0;
> > + polite_counter++;
> > + } else {
> > + impolite_counter++;
> > + polite_counter = 0;
> > + }
> > +
> > + if (impolite_counter > 10)
> > + die("Error: Learn some manners, say please some time!");
> > + if (polite_counter > 10)
> > + die("Error: Too many please! I don't believe you.");
>
> NAK. If we truly care, we need better AI here!
I agree but this patches goal was to implement the basic politeness
infrastructure. We planned to add more features, like inter-repository
jealousy, later. For inter-repository jealousy git would complain if you
worked more with one repository than others you cloned and you'd for
example sometimes need a double please to satisfy it.
Cheers Heiko
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html