git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Ressel <aranea@aixah.de>
To: git@vger.kernel.org
Subject: [feature request] Make "commit --only" work with new files
Date: Fri, 25 Nov 2016 17:56:19 +0100	[thread overview]
Message-ID: <20161125175619.19e13e59@gentp.lnet> (raw)

Hello,

currently "git commit --only <file>" only works if <file> is already
checked into the repo, but not with newly created and still untracked
files (builtin/commit.c:list_path() throws the error "error: pathspec
'<file>' did not match any file(s) known to git.")

I don't think this limitation is intented. I've had a look at the
relevant part of builtin/commit.c, but unfortunately it wasn't obvious
to me how to fix this.

Regards,
Luis Ressel

             reply	other threads:[~2016-11-25 17:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 16:56 Luis Ressel [this message]
2016-11-28 14:09 ` [feature request] Make "commit --only" work with new files Johannes Schindelin
2016-11-28 17:52 ` Junio C Hamano

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=20161125175619.19e13e59@gentp.lnet \
    --to=aranea@aixah.de \
    --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.
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).