From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: [PATCH/RFC] Allow file removal when "git commit --all" is used.
Date: Thu, 18 Aug 2005 00:59:37 -0700 [thread overview]
Message-ID: <7v64u3k74m.fsf@assigned-by-dhcp.cox.net> (raw)
After you deleted files from your working tree, automatic
git-update-cache used when the "--all" flag is given to "git
commit" barfs because it lacks the --remove flag.
It can be argued that this is a feature; people should be
careful and something with a grave consequence like removing
files should be done manually, in which case the current
behaviour may be OK.
The patch is for people who thinks the user who uses the "--all"
flag deserves the danger that comes with the convenience.
Comments?
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/git-commit-script b/git-commit-script
--- a/git-commit-script
+++ b/git-commit-script
@@ -88,13 +88,13 @@ esac
case "$all,$#" in
t,*)
git-diff-files --name-only -z |
- xargs -0 git-update-cache -q --
+ xargs -0 git-update-cache -q --remove --
;;
,0)
;;
*)
git-diff-files --name-only -z "$@" |
- xargs -0 git-update-cache -q --
+ xargs -0 git-update-cache -q --remove --
;;
esac || exit 1
git-update-cache -q --refresh || exit 1
next reply other threads:[~2005-08-18 7:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-18 7:59 Junio C Hamano [this message]
2005-08-18 10:49 ` [PATCH/RFC] Allow file removal when "git commit --all" is used Johannes Schindelin
2005-08-19 1:04 ` Junio C Hamano
2005-08-19 8:06 ` 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=7v64u3k74m.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--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