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, 12:57 UTC
Message-ID
<81b0412b0711270457i1d0a05a2nc2715f1918f26f31@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0711271115300.27959@racer.site>
On 27/11/2007, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> [commenting on the patch is a little cumbersome when the mailer does not
> quote it for you...]

Yes, I'm sorry. But being at work I'm extremely lucky to have access to even gmail (it was blocked for almost a month as a virus source. Of course it is a virus source! It is a damn mailbox!)

Show 10 quoted lines
> On Tue, 27 Nov 2007, Alex Riesen wrote:
>
> @@ -550,6 +557,8 @@ static int parse_and_validate_options(int argc, const char *argv[])
>                         free(enc);
>         }
>
> +       if (all)
> +               cached_only = 0;
>
> My reply> I would rather add another !!cached_only to the existing if().
I'm... Not sure. I'm using it like this:
   $ alias gci='git commit --cached'
   $ gci

So sometimes I actually want to override --cached, and just so happens it is always --all case, which seem to be in line with proposals to make --all default commit behavior.

Show 9 quoted lines
> @@ -678,7 +688,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>         }
>
>         if (!prepare_log_message(index_file, prefix) && !in_merge) {
> -               run_status(stdout, index_file, prefix);
> +               if (!cached_only)
> +                       run_status(stdout, index_file, prefix);
>
> My reply> Would it not make more sense to avoid run_status() when no_edit?
Will try it out this evening at home. I suspect you're right :)
Previous: Johannes SchindelinNext: Johannes Sixt
Message 3 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.