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

Re: [PATCH/RFC] WIP: log: allow "-" as a short-hand for "previous branch"

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 6, 2017, 23:09 UTC
Message-ID
<xmqqtw86zzk4.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170206181026.GA4010@ubuntu-512mb-blr1-01.localdomain>
Siddharth Kannan <kannan.siddharth12@gmail.com> writes:
> Hey Junio, I did some more digging into the codepath:
> ...
> In case you would prefer for me to not work on this anymore
> because I am new to the codebase, I will leave it at this.
The above is nicely analized and summarized.

The earlier mention of "those new to the codebase" by me was "this is an inappropriate topic as a GSoC microproject for people new to the codebase" and it wasn't meant to say "this part of the code is too precious to let unknown folks touch it."

The focus of GSoC being mentoring those who are new to the open source development, and hopefully retain them in the community after GSoC is over, we do expect microprojects to be suitable for those who are new to the codebase.

The focus of microprojects are twofold. It is a way for new people to learn the way in which they will be interacting with the community once they become Git developers, sending their patches (which includes analyzing and explaining the problem they are trying to solve and their solution to it) and receiving and responding to review comments. We also want to find out which candidates are willing to learn and which ones are difficult to work with during the process. And its primary focus is not about solving the real issues the project has with its code---something "bite-sized" is sufficient (and desirable) for microprojects for both GSoC student candidates and GSoC mentors and reviewers to work with.

Show 5 quoted lines
> (c) -> Else look for "r1^-"
> ...
> Case (c) is a bit confusing. This could be something like "-^-", and
> something like "^-" could mean "Not commits on previous branch" or it
> could mean "All commits on this branch except for the parent of HEAD"
Do you mean:
    "git rev-parse ^-" does not mean "git rev-parse HEAD^-", but we
    probably would want to, and if that is what is going to happen,
    "^-" should mean "HEAD^-", and cannot be used for "^@{-1}"?

It's friend "^!" does not mean "HEAD^!", and "^@" does not mean "HEAD^@", either (the latter is somewhat borked, though, and "^@" translates to "^HEAD" because confusingly "@" stands for "HEAD" sometimes).

So my gut feeling is that it is probably OK to make "^-" mean "^@{-1}"; it may be prudent to at least initially keep "^-" an error like it currently is already, though.

Previous: Siddharth KannanNext: Siddharth Kannan
Message 6 of 11 in “WIP: log: allow "-" as a short-hand for "previous branch"”
  1. WIP: log: allow "-" as a short-hand for "previous branch"Siddharth Kannan, Feb 5, 2017
  2. Pranit BauvaFeb 5, 2017
  3. Junio C HamanoFeb 6, 2017
  4. Siddharth KannanFeb 6, 2017
  5. Siddharth KannanFeb 6, 2017
  6. Junio C HamanoFeb 6, 2017
  7. Siddharth KannanFeb 7, 2017
  8. Matthieu MoyFeb 8, 2017
  9. Siddharth KannanFeb 8, 2017
  10. Matthieu MoyFeb 9, 2017
  11. Siddharth KannanFeb 9, 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.