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

Re: `@` alias for `HEAD` not working in `git push -u origin @`

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jul 11, 2019, 14:48 UTC
Message-ID
<20190711144828.GH9224@genre.crustytoothpaste.net>
In-Reply-To
<nycvar.QRO.7.76.6.1907111141380.46@tvgsbejvaqbjf.bet>
On 2019-07-11 at 09:46:26, Johannes Schindelin wrote:
Show 5 quoted lines
> After reading that thread, I come to the conclusion that it was not so
> much a decision not to pick it up, but more like a falling between the
> cracks.
> 
> I would be in favor of this patch.

I think there was some later follow-up in a different thread (one of the "What's cooking" threads) that expressed reservations about it, but I can't find that thread right now.

Regardless, if there's interest, I can certainly resend and see how folks on the list feel about it.

Show 5 quoted lines
> Since I have your attention and since I am interested in a related issue
> (when I wanted to propose a GSoC mini project to let `git fetch <remote>
> @` expand the `@` to the current (local) branch name, Matthieu Moy
> pointed out that `git fetch --current <remote>` might be a better UI):
> what does your patch do with `git fetch`'s refspec arguments?

I haven't checked. I believe it would resolve "git fetch origin @" to "git fetch origin HEAD" and "git fetch origin @:refs/heads/master" to "git fetch origin HEAD:refs/heads/master".

I can add some additional tests for this case, although I'm not especially sure that it provides useful behavior people will want.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 7 in “`@` alias for `HEAD` not working in `git push -u origin @`”
  1. Mark FlorianJul 10, 2019
  2. brian m. carlsonJul 10, 2019
  3. Johannes SchindelinJul 11, 2019
  4. brian m. carlsonJul 11, 2019
  5. Johannes SchindelinJul 12, 2019
  6. Jeff KingJul 31, 2019
  7. Junio C HamanoJul 31, 2019

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.