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

Re: [PATCH] builtin-commit: add --cached to operate only on index

From
Alex Riesen <raa.lkml@gmail.com>
Date
Nov 27, 2007, 18:12 UTC
Message-ID
<81b0412b0711271012v67f1058fj8c0de8e511543d4e@mail.gmail.com>
In-Reply-To
<7vfxyrd2x2.fsf@gitster.siamese.dyndns.org>
On 27/11/2007, Junio C Hamano <gitster@pobox.com> wrote:
> I am sympathetic to the _cause_, but I do not think the option --cached
> is a good match for this change.  As Hannes points out, as-is commit is
> the default, and --cached to other commands mean "work only with index
> not work tree", not "short-circuit for systems with slow lstat(3)".

I don't just mean to avoid lstat. I'm trying to avoid _any_ interaction with the thing unless absolutely needed.

>  * The option "--cached" is a wrong thing to have the user say and is
>    not what you want anyway. You want "no status list in the commit log
>    template";

That is not what I meant to say. I do want status list in commit message. I don't want anything except git-diff-index --name-status --cached HEAD in it. No untracked files whatsoever.

And, as I said, I also just want to commit the index _exactly_ as it is. No checking for files changed after they were updated in the index intended. I think that whatever the index holds is perfect (except it's no different from HEAD) and I want commit it now.

>  * Skip run_status() and replace with "diff-index --cached HEAD" (or "is
>    the index empty?") when the user instructs so;
Right. Is it not what happens with the patch?
Previous: Junio C HamanoNext: Alex Riesen
Message 7 of 14 in “builtin-commit: add --cached to operate only on index”
  1. builtin-commit: add --cached to operate only on indexAlex Riesen, Nov 27, 2007
  2. Johannes SchindelinNov 27, 2007
  3. Alex RiesenNov 27, 2007
  4. Johannes SixtNov 27, 2007
  5. Alex RiesenNov 27, 2007
  6. Junio C HamanoNov 27, 2007
  7. Alex RiesenNov 27, 2007
  8. Alex RiesenNov 27, 2007
  9. Do not generate full commit log message if it not going to be usedAlex Riesen, Nov 27, 2007
  10. Alex RiesenNov 27, 2007
  11. Johannes SchindelinNov 28, 2007
  12. Alex RiesenNov 28, 2007
  13. Do not generate full commit log message if it is not going to be usedAlex Riesen, Nov 28, 2007
  14. Johannes SchindelinNov 28, 2007

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.