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

Re: [GSoC microproject help] Allow "-" as a short-hand for "@{-1}" in more places

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 6, 2015, 20:37 UTC
Message-ID
<xmqqpp8lyi99.fsf@gitster.dls.corp.google.com>
In-Reply-To
<loom.20150306T210409-558@post.gmane.org>
Sundararajan R <dyoucme@gmail.com> writes:
> Although I have been using git from a long time, this is 
> the first occasion when I have picked up reading its source code. Can 
> somebody please help me by telling me how to start off with the above 
> mentioned microproject?

A good place to start on the specific coding side is to see how existing changes for the same objective were done.

Hints:
  Does reading "git log --grep='@{-1}'" help you?  When was @{-1}
  introduced, and how is it connected to the "-" short-hand that is
  exposed to the end-user by what mechanism in commits surrounding
  the one that introduces the @{-1} mechanism?
  Does reading "git grep '@{-1}'" help you?  Where does it appear?
  What code interprets it to find the last branch before you
  switched and how?  Who calls that code?  Is there something that
  turns a user-supplied "-" into "@{-1}" before calling that code?
  What did that caller looked like before it started noticing "-"?
  Does running "git blame -L<line range>" on that caller help you to
  find out which commit made the change, and does running "git show"
  on that commit help you understand how the change was done?

At the same time, GSoC is about working _with_ the development community, so another good place to start (you need to start on both fronts) is to subscribe and read this mailing list and also to dig the list archive (hint: the search interface of gmane often let you find gems) to understand how other people propose new changes and how their changes are discussed, reviewed and polished. You'll be part of that kind of exchanges yourself once you become part of the project.

Welcome.
Previous: Sundararajan RNext: Akshay Aurora
Message 2 of 3 in “[GSoC microproject help] Allow "-" as a short-hand for "@{-1}" in more places”
  1. Sundararajan RMar 6, 2015
  2. Junio C HamanoMar 6, 2015
  3. Akshay AuroraMar 6, 2015

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.