{"thread":{"id":"1986","subject":"[PATCH] Fix cg-admin-uncommit","startedAt":"2005-09-30T18:35:46Z","lastAt":"2005-10-11T23:16:17Z","messageCount":2,"participants":["Paolo 'Blaisorblade' Giarrusso","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"9564","messageId":"20050930183545.15895.61691.stgit@zion.home.lan","threadId":"1986","inReplyTo":null,"subject":"[PATCH] Fix cg-admin-uncommit","fromName":"Paolo 'Blaisorblade' Giarrusso","fromEmail":"blaisorblade@yahoo.it","sentAt":"2005-09-30T18:35:46Z","receivedAt":"2005-09-30T18:35:46Z","isPatch":true,"sender":{"key":"blaisorblade@yahoo.it","avatar":null},"body":"From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n\nIt uses $1 rather than ${ARGS[0]}, which breaks when optparse found some\noptions, i.e. with cg-admin-uncommit -t (cg-object-id -c -t is not nice).\n\nPlease, document optparse to explain this. It's absolutely non-obvious, and when\nI first hit this I thought optparse was buggy but couldn't make my way to the\nfix.\n\nBoth because I was using cogito rather than debugging it, and even considering\nthe obfuscation level, but above all I was looking for a call to shift in\noptshift and didn't find it. Now I understood the thing I pity myself, though.\n\nBtw, why doesn't optparse consume all the cmd arguments via shift, making thus\nsure that $1 never works at all?\n\nSigned-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n---\n\n cg-admin-uncommit |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/cg-admin-uncommit b/cg-admin-uncommit\n--- a/cg-admin-uncommit\n+++ b/cg-admin-uncommit\n@@ -47,7 +47,7 @@ done\n \n base=$(cg-object-id -c) || exit 1\n \n-commit=$(cg-object-id -c \"$1\") || exit 1\n+commit=$(cg-object-id -c \"${ARGS[0]}\") || exit 1\n git-rev-list $base | grep -q $commit || \\\n \tdie \"$commit: not an ancestor of HEAD\"\n \n"},{"id":"9983","messageId":"20051011231617.GG30889@pasky.or.cz","threadId":"1986","inReplyTo":"20050930183545.15895.61691.stgit@zion.home.lan","subject":"Re: [PATCH] Fix cg-admin-uncommit","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-10-11T23:16:17Z","receivedAt":"2005-10-11T23:16:17Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Sep 30, 2005 at 08:35:46PM CEST, I got a letter\nwhere Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> told me that...\n> Btw, why doesn't optparse consume all the cmd arguments via shift, making thus\n> sure that $1 never works at all?\n\nI did something hopefully equivalent, thanks for the idea (and for the\npatch as well :-).\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"}]}