{"thread":{"id":"3156","subject":"What is \"-u\" supposed to mean in git-fetch?","startedAt":"2006-01-26T10:57:27Z","lastAt":"2006-01-27T03:37:46Z","messageCount":3,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"15141","messageId":"Pine.LNX.4.63.0601261148510.32499@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3156","inReplyTo":null,"subject":"What is \"-u\" supposed to mean in git-fetch?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-01-26T10:57:27Z","receivedAt":"2006-01-26T10:57:27Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n96b086d6 introduced \"-u\" to mean \"--upload-pack\" taking one argument. But \nlong ago, b10ac50f1 from Aug 10 already introduced \"-u\" to mean \n\"--update-head-ok\" (without argument). This broke my scripts badly.\n\nSo, what is it?\n\nAlso, in the course of researching this, I tried\n\n\tgit-whatchanged git-fetch-script\n\nbecause git-whatchanged does not follow renames. But that did not work, \nbecause there is no current file of that name! When I created a dummy file \nof that name, git-whatchanged worked real fine! I consider that behaviour \na bug.\n\nCiao,\nDscho\n"},{"id":"15146","messageId":"7voe1zfbsm.fsf@assigned-by-dhcp.cox.net","threadId":"3156","inReplyTo":"Pine.LNX.4.63.0601261148510.32499@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: What is \"-u\" supposed to mean in git-fetch?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-26T11:50:33Z","receivedAt":"2006-01-26T11:50:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> 96b086d6 introduced \"-u\" to mean \"--upload-pack\" taking one argument. But \n> long ago, b10ac50f1 from Aug 10 already introduced \"-u\" to mean \n> \"--update-head-ok\" (without argument). This broke my scripts badly.\n>\n> So, what is it?\n\nAh, I was not careful enough when reviewing.\n\nYou are right.  The newcomer --upload-pack should drop its\nabbreviation shorter than \"--upl\".\n\n> Also, in the course of researching this, I tried\n>\n> \tgit-whatchanged git-fetch-script\n\nAs in Linus' message, \"git whatchanged -- git-fetch-script\" is\nsupposed to be the kosher way now, but it does *not* work.\n\nI started to suspect that flag/option parsing with rev-parse has\noutlived its usefulness, at least in whatchanged.\n\nIt is getting late, so won't have updates from me tonight.\nSorry.\n"},{"id":"15159","messageId":"7v3bja733p.fsf@assigned-by-dhcp.cox.net","threadId":"3156","inReplyTo":"7voe1zfbsm.fsf@assigned-by-dhcp.cox.net","subject":"Re: What is \"-u\" supposed to mean in git-fetch?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-27T03:37:46Z","receivedAt":"2006-01-27T03:37:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>...\n>> Also, in the course of researching this, I tried\n>>\n>> \tgit-whatchanged git-fetch-script\n>\n> As in Linus' message, \"git whatchanged -- git-fetch-script\" is\n> supposed to be the kosher way now, but it does *not* work.\n\n\nHere is an attempt to fix it.\n\nIt is not perfect.  As I said in a different message, the option\nparsing by rev-parse in whatchanged might have outlived its\nusefulness, especially after rev-list acquired path limit\narguments.  If you see what 'sh -x git-whatchanged' does, you\nwill notice that the path limiter is not given to rev-list, but\nis given to diff-tree.\n\n-- >8 --\n[PATCH] rev-parse: make \"whatchanged -- git-fetch-script\" work again.\n\nThe latest update to avoid misspelled revs interfered when we\nwere not interested in parsing non flags or arguments not meant\nfor rev-list.  This makes these two forms work again:\n\n\tgit whatchanged -- git-fetch-script\n\nWe could enable \"!def\" in the part this change touches to make\nthe above work without '--', but then it would cause misspelled\nv2.6.14..v2.6.16 to be given to diff-tree and defeats the whole\npoint of the previous fix.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n rev-parse.c |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\nf63fb6067037890d4928e35f7839f2a133a08d80\ndiff --git a/rev-parse.c b/rev-parse.c\nindex 7abad35..9567b0f 100644\n--- a/rev-parse.c\n+++ b/rev-parse.c\n@@ -294,7 +294,9 @@ int main(int argc, char **argv)\n \t\t}\n \t\tif (verify)\n \t\t\tdie(\"Needed a single revision\");\n-\t\tif (lstat(arg, &st) < 0)\n+\t\tif ((filter & DO_REVS) &&\n+\t\t    (filter & DO_NONFLAGS) && /* !def && */\n+\t\t    lstat(arg, &st) < 0)\n \t\t\tdie(\"'%s': %s\", arg, strerror(errno));\n \t\tas_is = 1;\n \t\tshow_file(arg);\n-- \n1.1.4.g2cff\n"}]}