{"thread":{"id":"45339","subject":"[PATCH v2 GSoC RFC] diff: allow \"-\" as a short-hand for \"last branch\"","startedAt":"2017-03-10T04:59:22Z","lastAt":"2017-03-10T04:59:22Z","messageCount":1,"participants":["Siddharth Kannan"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"313732","messageId":"20170310045903.GA2417@instance-1.c.mfqp-source.internal","threadId":"45339","inReplyTo":null,"subject":"[PATCH v2 GSoC RFC] diff: allow \"-\" as a short-hand for \"last branch\"","fromName":"Siddharth Kannan","fromEmail":"kannan.siddharth12@gmail.com","sentAt":"2017-03-10T04:59:03Z","receivedAt":"2017-03-10T04:59:22Z","isPatch":true,"sender":{"key":"kannan.siddharth12@gmail.com","avatar":"https://gravatar.com/avatar/f555b34abc9cec49fd7e7ca4a55b58be0e0af0fc58e75b7887210199b7d4ca5a?d=mp&s=160"},"body":"Hey, I have already worked on this, and I made the change inside\nsha1_name.c.\n\nThe final version of my patch is here[1].\n\n> Handling the dash in sha1_name:get_sha1_basic is not an issue but\n> git\n> was designed with the dash in mind for options not for this weird\n> short-hand so as long as there's no decision made that git should\n> actually have this short-hand everywhere it does not seem like a\n> good\n> idea to change anything in there because it would probably have\n> unwanted side-effects.\n\nActually, this was discussed even when I was working on this patch.\n\nI said [2]\n\n> Making a change in sha1_name.c will touch a lot of commands\n> (setup_revisions is called from everywhere in the codebase), so, I\n> am\n> still trying to figure out how to do this such that the rest of the\n> codepath remains unchanged.\n\nMatthieu replied to this [3]\n\n> I don't have strong opinion on this: I tend to favor consistency and\n> supporting \"-\" everywhere goes in this direction, but I think the\n> downsides should be considered too. A large part of the exercice\n> here\n> is to write a good commit message!\n\nFrom the discussion over the different versions of my patch, I get\nthe feeling that enabling this shorthand for all the commands is the\ndirection that git wants to move in.\n\nSorry about the time you spent on this patch.\n\n[1]: http://public-inbox.org/git/1488007487-12965-1-git-send-email-kannan.siddharth12@gmail.com/\n[2]: https://public-inbox.org/git/20170207191450.GA5569@ubuntu-512mb-blr1-01.localdomain/\n[3]: https://public-inbox.org/git/vpqh944eof7.fsf@anie.imag.fr/\n\nThanks,\nSiddharth.\n\nP.S. This message was sent _before_ 1cmCXH-0000ND-9K@crossperf.com but\nI didn't CC The mailing list in that message. I am sending it with the\nmailing list cc-ed to ensure that the conversation makes sense.\n\n"}]}