git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [PATCH v2 GSoC RFC] diff: allow "-" as a short-hand for "last branch"

From
Mmash <mash+git@crossperf.com>
Date
Mar 10, 2017, 04:52 UTC
Message-ID
<1cmCXH-0000ND-9K@crossperf.com>
In-Reply-To
<1cm4dm-0007OE-MZ@crossperf.com>
> From the discussion over the different versions of my patch, I get
> the feeling that enabling this shorthand for all the commands is the
> direction that git wants to move in.
Interesting.
> Sorry about the time you spent on this patch.

Don't worry about it. I just seem to be too stupid to search through the mailing list archive properly.

Maybe you can reuse the diff tests. I'll do another microproject then.
mash
The original message doesn't seem to cc the mailing list:
> Hey, I have already worked on this, and I made the change inside
> sha1_name.c.
> The final version of my patch is here[1].
Show 6 quoted lines
> > Handling the dash in sha1_name:get_sha1_basic is not an issue but git
> > was designed with the dash in mind for options not for this weird
> > short-hand so as long as there's no decision made that git should
> > actually have this short-hand everywhere it does not seem like a good
> > idea to change anything in there because it would probably have
> > unwanted side-effects.
> Actually, this was discussed even when I was working on this patch.
> I said [2]
> > Making a change in sha1_name.c will touch a lot of commands
> > (setup_revisions is called from everywhere in the codebase), so, I am
> > still trying to figure out how to do this such that the rest of the
> > codepath remains unchanged.
> Matthieu replied to this [3]
> > I don't have strong opinion on this: I tend to favor consistency and
> > supporting "-" everywhere goes in this direction, but I think the
> > downsides should be considered too. A large part of the exercice here
> > is to write a good commit message!
> From the discussion over the different versions of my patch, I get
> the feeling that enabling this shorthand for all the commands is the
> direction that git wants to move in.
> Sorry about the time you spent on this patch.
> [1]: http://public-inbox.org/git/1488007487-12965-1-git-send-email-kannan.siddharth12@gmail.com/
> [2]: https://public-inbox.org/git/20170207191450.GA5569@ubuntu-512mb-blr1-01.localdomain/
> [3]: https://public-inbox.org/git/vpqh944eof7.fsf@anie.imag.fr/
> Thanks,
> Siddharth.
Previous: mashNext: Siddharth Kannan
Message 3 of 4 in “diff: allow "-" as a short-hand for "last branch"”
  1. diff: allow "-" as a short-hand for "last branch"mash, Mar 8, 2017
  2. diff: allow "-" as a short-hand for "last branch"mash, Mar 9, 2017
  3. mashMar 10, 2017
  4. Siddharth KannanMar 10, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.