{"thread":{"id":"5109","subject":"Regression: git-commit no longer works from within subdirectories","startedAt":"2006-08-03T18:06:20Z","lastAt":"2006-08-04T04:26:57Z","messageCount":4,"participants":["Robert Shearman","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"24653","messageId":"44D23B1C.80704@codeweavers.com","threadId":"5109","inReplyTo":null,"subject":"Regression: git-commit no longer works from within subdirectories","fromName":"Robert Shearman","fromEmail":"rob@codeweavers.com","sentAt":"2006-08-03T18:06:20Z","receivedAt":"2006-08-03T18:06:20Z","isPatch":false,"sender":{"key":"robertshearman@gmail.com","avatar":null},"body":"Hi,\n\nIn the latest master branch git-commit no longer works from within \nsubdirectories. Instead, you have to go to the top-level directory of \nthe git tree to do the commit.\n\nIt fails with a confusing message when you are in a subdirectory:\nrob@saturn:~/wine-git/dlls/msi$ git commit action.c\nusage: git-read-tree (<sha> | [[-m [--aggressive] | --reset | \n--prefix=<prefix>] [-u | -i]] <sha1> [<sha2> [<sha3>]])\n\nI'm not sure whether the previous behaviour was intentional, but I got \nused to it. Either way, I don't think users upgrading from 1.4.1 would \nappreciate a user-facing change like this in a 0.0.1 incremental release.\n\nCan this be changed back to the previous behaviour?\n\nThanks,\n\n-- \nRob Shearman\n"},{"id":"24660","messageId":"7vzmelprm8.fsf@assigned-by-dhcp.cox.net","threadId":"5109","inReplyTo":"44D23B1C.80704@codeweavers.com","subject":"Re: Regression: git-commit no longer works from within subdirectories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-03T19:05:19Z","receivedAt":"2006-08-03T19:05:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Robert Shearman <rob@codeweavers.com> writes:\n\n> In the latest master branch git-commit no longer works from within\n> subdirectories. Instead, you have to go to the top-level directory of\n> the git tree to do the commit.\n\nThis is broken and sorry I did not notice it earlier because I\nusually run the tip of \"next\".  Will take a look.\n"},{"id":"24667","messageId":"20060803202957.GA26838@coredump.intra.peff.net","threadId":"5109","inReplyTo":"44D23B1C.80704@codeweavers.com","subject":"Re: Regression: git-commit no longer works from within subdirectories","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-08-03T20:29:57Z","receivedAt":"2006-08-03T20:29:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Aug 03, 2006 at 07:06:20PM +0100, Robert Shearman wrote:\n\n> It fails with a confusing message when you are in a subdirectory:\n> rob@saturn:~/wine-git/dlls/msi$ git commit action.c\n> usage: git-read-tree (<sha> | [[-m [--aggressive] | --reset | \n> --prefix=<prefix>] [-u | -i]] <sha1> [<sha2> [<sha3>]])\n\nThe culprit is the recent changes to the builtins. cmd_read_tree now\ntakes an extra parameter 'prefix' which shadows the global declaration\nin builtin-read-tree.c (and has a completely different meaning).\n\nThe one-liner below fixes it (though style-wise, you may prefer to rename the\nshadowed variable).\n\n-Peff\n\n---\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex 49c10bf..8e3b04e 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -870,7 +870,7 @@ static const char read_tree_usage[] = \"g\n \n static struct lock_file lock_file;\n \n-int cmd_read_tree(int argc, const char **argv, const char *prefix)\n+int cmd_read_tree(int argc, const char **argv, const char *git_prefix)\n {\n        int i, newfd, stage = 0;\n        unsigned char sha1[20];\n"},{"id":"24685","messageId":"7vy7u5nn1q.fsf@assigned-by-dhcp.cox.net","threadId":"5109","inReplyTo":"20060803202957.GA26838@coredump.intra.peff.net","subject":"Re: Regression: git-commit no longer works from within subdirectories","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-04T04:26:57Z","receivedAt":"2006-08-04T04:26:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> The culprit is the recent changes to the builtins. cmd_read_tree now\n> takes an extra parameter 'prefix' which shadows the global declaration\n> in builtin-read-tree.c (and has a completely different meaning).\n\nThanks -- well spotted.  And of course \"next\" does not suffer\nbecause the prefix global is gone and is replaced with a member\nof a structure that is given as a parameter.\n"}]}