* [PATCH/RFC] Allow file removal when "git commit --all" is used.
@ 2005-08-18 7:59 Junio C Hamano
2005-08-18 10:49 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2005-08-18 7:59 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/RFC] Allow file removal when "git commit --all" is used.
2005-08-18 7:59 [PATCH/RFC] Allow file removal when "git commit --all" is used Junio C Hamano
@ 2005-08-18 10:49 ` Johannes Schindelin
2005-08-19 1:04 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2005-08-18 10:49 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi,
On Thu, 18 Aug 2005, Junio C Hamano wrote:
> 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?
This is a sane default behaviour. Maybe introduce yet another flag
"--no-remove", which says that removes should not be performed? But then,
"--all" is mostly used by lazy people, who probably expect the removes to
take place.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/RFC] Allow file removal when "git commit --all" is used.
2005-08-18 10:49 ` Johannes Schindelin
@ 2005-08-19 1:04 ` Junio C Hamano
2005-08-19 8:06 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2005-08-19 1:04 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> The patch is for people who thinks the user who uses the "--all"
>> flag deserves the danger that comes with the convenience.
>>
>> Comments?
>
> This is a sane default behaviour. Maybe introduce yet another flag
> "--no-remove", which says that removes should not be performed? But then,
> "--all" is mostly used by lazy people, who probably expect the removes to
> take place.
Well, let's refrain from using that word; I am one of the "lazy"
people, but I do that on purpose and from principle, not from
lazyness. http://members.cox.net/junkio/per-file-commit.txt.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/RFC] Allow file removal when "git commit --all" is used.
2005-08-19 1:04 ` Junio C Hamano
@ 2005-08-19 8:06 ` Johannes Schindelin
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2005-08-19 8:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi,
On Thu, 18 Aug 2005, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> >> The patch is for people who thinks the user who uses the "--all"
> >> flag deserves the danger that comes with the convenience.
> >>
> >> Comments?
> >
> > This is a sane default behaviour. Maybe introduce yet another flag
> > "--no-remove", which says that removes should not be performed? But then,
> > "--all" is mostly used by lazy people, who probably expect the removes to
> > take place.
>
> Well, let's refrain from using that word; I am one of the "lazy"
> people, but I do that on purpose and from principle, not from
> lazyness. http://members.cox.net/junkio/per-file-commit.txt.
Sorry, when I say "lazy people" I mean "yours truly".
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-19 8:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 7:59 [PATCH/RFC] Allow file removal when "git commit --all" is used Junio C Hamano
2005-08-18 10:49 ` Johannes Schindelin
2005-08-19 1:04 ` Junio C Hamano
2005-08-19 8:06 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox