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

Re: [PATCH 3/4] commit: turn commit.ignoreIntentToAdd to true by default

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 6, 2012, 20:03 UTC
Message-ID
<7v8vkf7mrn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1328525855-2547-4-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> -		if (!set_commit_ignoreintenttoadd) {

Now no warning() is associated with testing of this flag, which means that people who didn't get around to read the doc and react to the warnings in the earlier releases will get _nothing_ when the real change hits them?

That sounds strangely bad.  What am I missing?
Show 15 quoted lines
> +		if (!(cache_tree_flags & WRITE_TREE_IGNORE_INTENT_TO_ADD)) {
>  			int i;
>  			for (i = 0; i < active_nr; i++)
>  				if (active_cache[i]->ce_flags & CE_INTENT_TO_ADD)
>  					break;
>  			if (i < active_nr)
>  				warning(_("You are committing as-is with intent-to-add entries as the result of\n"
> -					  "\"git add -N\". Git currently forbids this case. This will change in\n"
> -					  "1.8.0 where intent-to-add entries are simply ignored when committing\n"
> -					  "as-is. Please look up document and set commit.ignoreIntentToAdd\n"
> -					  "properly to stop this warning."));
> +					  "\"git add -N\". Git currently forbids this case. But this is deprecated\n"
> +					  "support for this behavior will be dropped in FIXME.\n"
> +					  "Please look up document and set commit.ignoreIntentToAdd to true\n"
> +					  "or remove it."));
As this is marked with FIXME ;-)

At this point in the deprecation cycle, "currently forbids this case." is not true at all. "You asked me to punt when you forgot to tell me the final contents for i-t-a entries, so I am honoring your wish" is what is happening here. Perhaps...

	Git currently allows you to set commit.ignoreIntentToAdd to false
        to remind you about the paths you may have forgotten to add the
        real contents to before committing, but this support will be
        removed in future versions of Git.  Set commit.ignoreIntentToAdd
        to `false` or remove the variable, and get used to the new
        behaviour, to squelch this message.
Previous: Nguyễn Thái Ngọc DuyNext: Nguyen Thai Ngoc Duy
Message 17 of 20 in “Deprecate "not allow as-is commit with i-t-a entries"”
  1. 0/4 Deprecate "not allow as-is commit with i-t-a entries"Nguyễn Thái Ngọc Duy, Feb 6, 2012
  2. 1/4 cache-tree: update API to take abitrary flagsNguyễn Thái Ngọc Duy, Feb 6, 2012
  3. Junio C HamanoFeb 6, 2012
  4. 2/4 commit: introduce a config key to allow as-is commit with i-t-a entriesNguyễn Thái Ngọc Duy, Feb 6, 2012
  5. Junio C HamanoFeb 6, 2012
  6. Nguyen Thai Ngoc DuyFeb 7, 2012
  7. Jonathan NiederFeb 7, 2012
  8. Junio C HamanoFeb 6, 2012
  9. Jonathan NiederFeb 6, 2012
  10. Junio C HamanoFeb 6, 2012
  11. Nguyen Thai Ngoc DuyFeb 7, 2012
  12. Junio C HamanoFeb 7, 2012
  13. Junio C HamanoFeb 7, 2012
  14. Nguyen Thai Ngoc DuyFeb 7, 2012
  15. Junio C HamanoFeb 7, 2012
  16. 3/4 commit: turn commit.ignoreIntentToAdd to true by defaultNguyễn Thái Ngọc Duy, Feb 6, 2012
  17. Junio C HamanoFeb 6, 2012
  18. Nguyen Thai Ngoc DuyFeb 7, 2012
  19. 4/4 commit: remove commit.ignoreIntentToAdd, assume it's always trueNguyễn Thái Ngọc Duy, Feb 6, 2012
  20. Junio C HamanoFeb 6, 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.