git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Neukirchen <chneukirchen@gmail.com>
To: git@vger.kernel.org
Subject: Re: git commit -p with file arguments
Date: Fri, 09 Sep 2016 22:52:36 +0200	[thread overview]
Message-ID: <87inu4bxt7.fsf@juno.home.vuxu.org> (raw)
In-Reply-To: <23de5ffe-eaf8-2d62-2202-f1bf6087d44b@gmail.com> ("Jakub Narębski"'s message of "Fri, 9 Sep 2016 22:39:13 +0200")

Jakub Narębski <jnareb@gmail.com> writes:

> Which means that with "git add -p <pathspec> && git commit <pathspec>",
> the "git add -p <pathspec>" would carefully craft the <pathspec> state
> in the index... and "git commit <pathspec>" would take worktree version
> of <pathspec> for commit, ignoring what was in the index :-(
>
> Currently there is no way to create commit out of subset of the index,
> e.g. with "git commit :0:<path>"

I played around with creating a new index just for "add -p" and then
committing that one.  Seems to have worked...

Perhaps I'll just wrap git-commit myself then.

cu,
-- 
Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org


  reply	other threads:[~2016-09-09 20:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05 21:08 git commit -p with file arguments Christian Neukirchen
2016-09-09 10:54 ` Duy Nguyen
2016-10-05 10:26   ` Duy Nguyen
2016-10-05 11:38     ` Christian Neukirchen
2016-10-05 17:16     ` Junio C Hamano
2016-09-09 16:57 ` Jacob Keller
2016-09-09 17:05   ` Christian Neukirchen
2016-09-09 18:03   ` Junio C Hamano
2016-09-09 20:39     ` Jakub Narębski
2016-09-09 20:52       ` Christian Neukirchen [this message]
2016-09-10  9:52         ` Jakub Narębski
2016-09-11 21:50           ` Junio C Hamano
2016-09-11 22:05             ` Jacob Keller
2016-09-12  1:57               ` Junio C Hamano
2016-09-12  4:56                 ` Jacob Keller
2016-09-12 21:14                 ` Jakub Narębski

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=87inu4bxt7.fsf@juno.home.vuxu.org \
    --to=chneukirchen@gmail.com \
    --cc=git@vger.kernel.org \
    /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).