git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Riesen" <raa.lkml@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Kristian Høgsberg" <krh@redhat.com>
Subject: Re: [PATCH] builtin-commit: add --cached to operate only on index
Date: Tue, 27 Nov 2007 13:57:34 +0100	[thread overview]
Message-ID: <81b0412b0711270457i1d0a05a2nc2715f1918f26f31@mail.gmail.com> (raw)
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!)

> 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.

> @@ -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 :)

  reply	other threads:[~2007-11-27 12:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 10:54 [PATCH] builtin-commit: add --cached to operate only on index Alex Riesen
2007-11-27 11:18 ` Johannes Schindelin
2007-11-27 12:57   ` Alex Riesen [this message]
2007-11-27 11:35 ` Johannes Sixt
2007-11-27 12:48   ` Alex Riesen
2007-11-27 17:16     ` Junio C Hamano
2007-11-27 18:12       ` Alex Riesen
2007-11-27 18:18       ` Alex Riesen
2007-11-27 21:44         ` [PATCH] Do not generate full commit log message if it not going to be used Alex Riesen
2007-11-27 21:47           ` Alex Riesen
2007-11-28 12:18           ` Johannes Schindelin
2007-11-28 21:10             ` Alex Riesen
2007-11-28 21:13               ` [PATCH] Do not generate full commit log message if it is " Alex Riesen
2007-11-28 21:43               ` [PATCH] Do not generate full commit log message if it " Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81b0412b0711270457i1d0a05a2nc2715f1918f26f31@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=krh@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).