git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH 2/2] commit, write-tree: allow to ignore CE_INTENT_TO_ADD while writing trees
Date: Mon, 16 Jan 2012 15:21:46 -0800	[thread overview]
Message-ID: <7vaa5nutbp.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1326681407-6344-3-git-send-email-pclouds@gmail.com> (=?utf-8?B?Ik5ndXnhu4VuCVRow6FpIE5n4buNYw==?= Duy"'s message of "Mon, 16 Jan 2012 09:36:47 +0700")

Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:

> Normally cache-tree will not produce trees from an index that has
> CE_INTENT_TO_ADD entries. This is a safe measure to avoid
> mis-interpreting user's intention regarding this flag.

s/safe/safety/;

> There are situations however where users want to create trees/commits
> regardless i-t-a entries.

A new command line option "--no-check-intent-to-add" to "commit" without
any configuration bit may be a useful addition as a first cut, and in
order to help users to which "there are situations" is more than 50% of
the time, a configuration that can be overriden by "--check-intent-to-add"
may be a usability improvement over that first cut, but if this is really
about "there are situations", then a configuration that cannot be
overriden by command line option feels a wrong way to go about it.

Is this really about "there are situations" to begin with? I am suspecting
that this patch is either:

 (1) making it easier to use a wrong workflow, by promoting a way to
     bypass a useful safety measure;

 (2) fixing an earlier UI mistake (iow, the interpretation #2 in the old
     discussion is always the right one and the existing safety measure is
     misguided) in such a way that allows you to work around an objection
     from a bonehead maintainer who refuses to admit that earlier mistake;
     and/or

 (3) splitting the Git userbase into two and making the resulting system
     harder to teach.

If it is (2), and I suspect it may be the case, we might want to rather
honestly describe that the future direction is to fix it, and describe the
configuration option as "an early opt-in" switch, together with the usual
three-step deprecation and migration schedule to make the new behaviour
the default in a future version. From the timeline point of view, it
probably can coincide with the change to always start an editor when
recording a merge commit.

In any case, for this change to help people who add more than one paths
with "add -N" and want to include only a subset of them in the commit, we
may want to explicitly teach them to add what they want to before
committing with the new command line option in the documentation.

  parent reply	other threads:[~2012-01-16 23:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16  2:36 [PATCH 0/2] nd/commit-ignore-i-t-a replacement Nguyễn Thái Ngọc Duy
2012-01-16  2:36 ` [PATCH 1/2] cache-tree: update API to take abitrary flags Nguyễn Thái Ngọc Duy
2012-01-16  2:36 ` [PATCH 2/2] commit, write-tree: allow to ignore CE_INTENT_TO_ADD while writing trees Nguyễn Thái Ngọc Duy
2012-01-16 16:46   ` Pete Wyckoff
2012-01-16 23:21   ` Junio C Hamano [this message]
2012-01-17  1:50     ` Nguyen Thai Ngoc Duy
2012-01-17  2:47       ` Jonathan Nieder

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=7vaa5nutbp.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@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).