git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sidhant Sharma <tigerkid001@gmail.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Lars Schneider <larsxschneider@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFC/GSoC] Introduction
Date: Mon, 14 Mar 2016 21:30:23 +0530	[thread overview]
Message-ID: <56E6E017.1080709@gmail.com> (raw)
In-Reply-To: <CA+P7+xqsjY--_0aQgJKKNOBONDL5ULkRw+z+J7ATyJC=KWC1qg@mail.gmail.com>


On Monday 14 March 2016 11:44 AM, Jacob Keller wrote:
> On Sun, Mar 13, 2016 at 10:25 PM, Sidhant Sharma <tigerkid001@gmail.com> wrote:
>> On Monday 14 March 2016 04:58 AM, Jacob Keller wrote:
>>>
>>> If I recall correctly, a configuration setting was previously
>>> discussed but mostly discarded as a solution since any changes had
>>> better not impact any current scripts. Having to add "--no-beginner"
>>> for all of them seems unacceptable. Especially since many scripts may
>>> do potentially dangerous operations in a safe or useful way.
>>>
>> I agree that adding `--no-beginner` to all such commands wouldn't be right. In
>> that case, can we have the flag between git and the command? Such as
>> `git --no-beginner reset --hard`. If present, the flag can then be removed from
>> the argument list and the rest of the command executed as is without warning.
>> Would that a better option?
>>
>>
>> Thanks and regards,
>> Sidhant Sharma
>>
> No, the whole problem with "--no-beginner" is that scripts must either
> check the configuration variable or add the flag. Since, by definition
> exactly zero scripts do that today, then every script must either (a)
> be re-written, (b) accept that some behavior will not work as
> expected.
>
> Most (robust) scripts will already check for aliases, and if not, the
> user should expect that doing weird things to their environment in
> this way would cause things to break.
>
> I don't think we can create a design where scripts must be re-written
> to protect themselves or accept misbehaving in those ways.
>
> If we had a clear (used) delineation between porcelain and plumbing
> commands, we could have all the porcelain commands accept an argument
> but not plumbing. Except that (a) all plumbing commands can be called
> from the path relatively easily so a user might still want protection
> on those too and (b) we don't actually have an enforced
> plumbing/porcelain distinction. While we document one, several scripts
> exist in the wild which violate this and which we may want to support.
>
> I think that we could go this route, but we'd have to be willing to
> accept (a) or (b), above as costs to this route. Personally I prefer
> the wrapper approach since it neatly bypasses all of this behavior and
> seems easier to implement.  It's major downside is telling beginners
> to use "ggit" or similar, which is a big deal.
Thanks for elaborating on that. I now understand why the configuration
option approach is not fit. The 'ggit' wrapper does sound more
apt for this. I do realize telling the beginners to use 'ggit' instead 
of just 'git' is a shortcoming of this approach, but perhaps it's worth
it if it makes Git easier to use and understand for beginners. Lars'
suggestion of short instructions would be really nice for helping
beginners form a mental picture of git workflow, and might be worth
the trade-off.


Thanks and regards,
Sidhant Sharma

  reply	other threads:[~2016-03-14 16:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-12  6:59 [RFC/GSoC] Introduction Sidhant Sharma
2016-03-13 15:50 ` Lars Schneider
2016-03-13 18:33   ` Sidhant Sharma
2016-03-13 21:19     ` Kevin Daudt
2016-03-14  5:25       ` Sidhant Sharma
2016-03-14  6:15         ` Jacob Keller
2016-03-14  7:01       ` Junio C Hamano
2016-03-13 23:28     ` Jacob Keller
2016-03-14  5:25       ` Sidhant Sharma
2016-03-14  6:14         ` Jacob Keller
2016-03-14 16:00           ` Sidhant Sharma [this message]
2016-03-14  6:57   ` Junio C Hamano
2016-03-14  8:16     ` Lars Schneider
2016-03-14 15:56       ` Sidhant Sharma
2016-03-20 20:17         ` Matthieu Moy
2016-03-14 17:25       ` Junio C Hamano
2016-03-20 20:28         ` Matthieu Moy
2016-03-14 21:08       ` Philip Oakley
2016-03-17 14:52   ` Sidhant Sharma
2016-03-20 15:39     ` Lars Schneider
2016-03-20 15:51       ` Sidhant Sharma
2016-03-20 16:08         ` Lars Schneider
2016-03-20 16:22           ` Sidhant Sharma
  -- strict thread matches above, loose matches on Subject: below --
2016-03-22 17:51 Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E6E017.1080709@gmail.com \
    --to=tigerkid001@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.keller@gmail.com \
    --cc=larsxschneider@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).