git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Luben Tuikov <ltuikov@yahoo.com>
To: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: git-commit: select which files to commit while editing the commit message
Date: Fri, 8 Dec 2006 12:45:59 -0800 (PST)	[thread overview]
Message-ID: <360959.72234.qm@web31809.mail.mud.yahoo.com> (raw)
In-Reply-To: <elcegl$qfh$1@sea.gmane.org>

--- Jakub Narebski <jnareb@gmail.com> wrote:
> Junio C Hamano wrote:
> > Pazu <pazu@pazu.com.br> writes:
> > 
> >> # Please enter the commit message for your changes.
> >> # (Comment lines starting with '#' will not be included)
> >> # On branch refs/heads/next
> >> # Updated but not checked in:
> >> #   (will commit)
> >> #
> >> #    modified:   perl/Makefile
> >> #    modified:   var.c
> >>
> >> Here's where the magic would happen. Removing the line "modified: var.c" would
> >> remove var.c from this commit. Of course, the template message should be
> >> modified to tell the user he can do that.
> >>
> >> So, what do you think about this?
> > 
> > Personally, I would refuse to use such a modified git, because
> > often the first thing I would do in the commit log buffer is
> > check the listed files and remove the '# ...' lines while
> > typing.  I do not want that to affect the set of changes I
> > staged in any way.
> > 
> > But maybe that is just me.
> 
> I was to raise the same objection. 
> 
> But this can be solved by using magic _only_ if the template with exception
> of "modified:" lines matches, and if there is at least one file
> in "modified:" section.

I raise the same objection as Junio.

This is how perforce does it*, and while it is useful, git is NOT perforce,
and I agree with Junio and Jakub.

If you want to commit only few files, update the index for only
the ones you want to commit.  If you did update the index for all
of them, "git-read-tree -m -i HEAD" is your friend.

    Luben

* The reason being is that there is no "index-cache" and the commit
message needs to be scanned to determine which of the edited files
you actually intend to commit to the server at this time.

  reply	other threads:[~2006-12-08 20:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08 12:36 git-commit: select which files to commit while editing the commit message Pazu
2006-12-08 19:18 ` Junio C Hamano
2006-12-08 19:32   ` Jakub Narebski
2006-12-08 20:45     ` Luben Tuikov [this message]
2006-12-08 22:10       ` Josef Weidendorfer
2006-12-08 23:59         ` Seth Falcon
2006-12-09  0:07           ` Jakub Narebski
2006-12-09  0:37             ` Seth Falcon
2006-12-09  0:59               ` Junio C Hamano
2006-12-10  0:46                 ` Josef Weidendorfer
2006-12-10  0:54                   ` Junio C Hamano
2006-12-11  9:23                     ` [PATCH] git-add --interactive (wip) Junio C Hamano
2006-12-11 10:47                       ` Josef Weidendorfer
2006-12-12 21:51                         ` Junio C Hamano
2006-12-12 22:15                           ` Johannes Schindelin
2006-12-13  9:20                             ` Andreas Ericsson
2006-12-13  3:15                           ` Josef Weidendorfer
2006-12-13  5:34                             ` Junio C Hamano
2006-12-13 10:42                               ` Johannes Schindelin
2006-12-13 10:57                                 ` Shawn Pearce
2006-12-13 11:20                                   ` Johannes Schindelin
2006-12-13 20:31                               ` Josef Weidendorfer
2006-12-09  7:02   ` git-commit: select which files to commit while editing the commit message Sean

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=360959.72234.qm@web31809.mail.mud.yahoo.com \
    --to=ltuikov@yahoo.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).