{"thread":{"id":"1567","subject":"[PATCH/RFC] Allow file removal when \"git commit --all\" is used.","startedAt":"2005-08-18T07:59:37Z","lastAt":"2005-08-19T08:06:25Z","messageCount":4,"participants":["Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"7491","messageId":"7v64u3k74m.fsf@assigned-by-dhcp.cox.net","threadId":"1567","inReplyTo":null,"subject":"[PATCH/RFC] Allow file removal when \"git commit --all\" is used.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-18T07:59:37Z","receivedAt":"2005-08-18T07:59:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"After you deleted files from your working tree, automatic\ngit-update-cache used when the \"--all\" flag is given to \"git\ncommit\" barfs because it lacks the --remove flag.\n\nIt can be argued that this is a feature; people should be\ncareful and something with a grave consequence like removing\nfiles should be done manually, in which case the current\nbehaviour may be OK.\n\nThe patch is for people who thinks the user who uses the \"--all\"\nflag deserves the danger that comes with the convenience.\n\nComments?\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\ndiff --git a/git-commit-script b/git-commit-script\n--- a/git-commit-script\n+++ b/git-commit-script\n@@ -88,13 +88,13 @@ esac\n case \"$all,$#\" in\n t,*)\n \tgit-diff-files --name-only -z |\n-\txargs -0 git-update-cache -q --\n+\txargs -0 git-update-cache -q --remove --\n \t;;\n ,0)\n \t;;\n *)\n \tgit-diff-files --name-only -z \"$@\" |\n-\txargs -0 git-update-cache -q --\n+\txargs -0 git-update-cache -q --remove --\n \t;;\n esac || exit 1\n git-update-cache -q --refresh || exit 1\n"},{"id":"7498","messageId":"Pine.LNX.4.63.0508181248110.30218@wgmdd8.biozentrum.uni-wuerzburg.de","threadId":"1567","inReplyTo":"7v64u3k74m.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH/RFC] Allow file removal when \"git commit --all\" is used.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-08-18T10:49:46Z","receivedAt":"2005-08-18T10:49:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 18 Aug 2005, Junio C Hamano wrote:\n\n> After you deleted files from your working tree, automatic\n> git-update-cache used when the \"--all\" flag is given to \"git\n> commit\" barfs because it lacks the --remove flag.\n> \n> It can be argued that this is a feature; people should be\n> careful and something with a grave consequence like removing\n> files should be done manually, in which case the current\n> behaviour may be OK.\n> \n> The patch is for people who thinks the user who uses the \"--all\"\n> flag deserves the danger that comes with the convenience.\n> \n> Comments?\n\nThis is a sane default behaviour. Maybe introduce yet another flag \n\"--no-remove\", which says that removes should not be performed? But then, \n\"--all\" is mostly used by lazy people, who probably expect the removes to \ntake place.\n\nCiao,\nDscho\n"},{"id":"7535","messageId":"7vll2yenyv.fsf@assigned-by-dhcp.cox.net","threadId":"1567","inReplyTo":"Pine.LNX.4.63.0508181248110.30218@wgmdd8.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH/RFC] Allow file removal when \"git commit --all\" is used.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-19T01:04:40Z","receivedAt":"2005-08-19T01:04:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> The patch is for people who thinks the user who uses the \"--all\"\n>> flag deserves the danger that comes with the convenience.\n>> \n>> Comments?\n>\n> This is a sane default behaviour. Maybe introduce yet another flag \n> \"--no-remove\", which says that removes should not be performed? But then, \n> \"--all\" is mostly used by lazy people, who probably expect the removes to \n> take place.\n\nWell, let's refrain from using that word; I am one of the \"lazy\"\npeople, but I do that on purpose and from principle, not from\nlazyness.  http://members.cox.net/junkio/per-file-commit.txt.\n"},{"id":"7553","messageId":"Pine.LNX.4.63.0508191005450.11916@wgmdd8.biozentrum.uni-wuerzburg.de","threadId":"1567","inReplyTo":"7vll2yenyv.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH/RFC] Allow file removal when \"git commit --all\" is used.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-08-19T08:06:25Z","receivedAt":"2005-08-19T08:06:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 18 Aug 2005, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> >> The patch is for people who thinks the user who uses the \"--all\"\n> >> flag deserves the danger that comes with the convenience.\n> >> \n> >> Comments?\n> >\n> > This is a sane default behaviour. Maybe introduce yet another flag \n> > \"--no-remove\", which says that removes should not be performed? But then, \n> > \"--all\" is mostly used by lazy people, who probably expect the removes to \n> > take place.\n> \n> Well, let's refrain from using that word; I am one of the \"lazy\"\n> people, but I do that on purpose and from principle, not from\n> lazyness.  http://members.cox.net/junkio/per-file-commit.txt.\n\nSorry, when I say \"lazy people\" I mean \"yours truly\".\n\nCiao,\nDscho\n"}]}