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
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 27, 2007, 11:18 UTC
Message-ID
<Pine.LNX.4.64.0711271115300.27959@racer.site>
In-Reply-To
<81b0412b0711270254i58be4d2fi5021767d99fcb753@mail.gmail.com>
Hi,

[commenting on the patch is a little cumbersome when the mailer does not quote it for you...]

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;
        if (!!also + !!only + !!all + !!interactive > 1)
                die("Only one of --include/--only/--all/--interactive can be used.");
        if (argc == 0 && (also || (only && !amend)))



My reply> I would rather add another !!cached_only to the existing if().



@@ -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);
                rollback_index_files();
                unlink(commit_editmsg);
                return 1;


My reply> Would it not make more sense to avoid run_status() when no_edit?

My reply> Ciao,
My reply> Dscho
Previous: Alex RiesenNext: Alex Riesen
Message 2 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.