git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] commit, write-tree: allow to ignore CE_INTENT_TO_ADD while writing trees

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jan 17, 2012, 01:50 UTC
Message-ID
<CACsJy8B_qGphVz8PFhPNLsOe-Ve7xb+biNP8Ok7dXiygu3KoSg@mail.gmail.com>
In-Reply-To
<7vaa5nutbp.fsf@alter.siamese.dyndns.org>
2012/1/17 Junio C Hamano <gitster@pobox.com>:
Show 7 quoted lines
> 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.
"git -c key=value commit" may help.
Show 14 quoted lines
> 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.

This patch is towards (3). I agree that "add -N" can be confusing to new users because it does not actually add anything. Those who do not read manual carefully and commit without checking the result may fall into that trap. So a user is expected to "level up" a bit and hopefully by the time he/she feels the need to get around the safety check and discover this flag, they should be ready to go without the safety check.

Although I would not oppose deprecating the old behavior if you go with (2) ;)
> 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.

yeah, keep telling people "this does not add any thing, you need to git-add again without -N" after running "add -N" using advice framework when this config is on?

-- 
Duy
Previous: Junio C HamanoNext: Jonathan Nieder
Message 6 of 7 in “nd/commit-ignore-i-t-a replacement”
  1. 0/2 nd/commit-ignore-i-t-a replacementNguyễn Thái Ngọc Duy, Jan 16, 2012
  2. 1/2 cache-tree: update API to take abitrary flagsNguyễn Thái Ngọc Duy, Jan 16, 2012
  3. 2/2 commit, write-tree: allow to ignore CE_INTENT_TO_ADD while writing treesNguyễn Thái Ngọc Duy, Jan 16, 2012
  4. Pete WyckoffJan 16, 2012
  5. Junio C HamanoJan 16, 2012
  6. Nguyen Thai Ngoc DuyJan 17, 2012
  7. Jonathan NiederJan 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.