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

Re: [PATCH 0/3] Support config-based names

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jun 12, 2007, 05:56 UTC
Message-ID
<Pine.LNX.4.64.0706120131010.5848@iabervon.org>
In-Reply-To
<7vbqfln3mf.fsf@assigned-by-dhcp.pobox.com>
On Mon, 11 Jun 2007, Junio C Hamano wrote:
Show 9 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes:
> 
> > It can be useful to refer to commits in remotes based on their configured 
> > relationship to local branches. For example, "git log HEAD^[push]..HEAD" 
> > would, when pushing is set up, show what hasn't been pushed yet.
> 
> It's not like we will be adding 'push' objects and 'merge'
> objects, so I think HEAD^{push} (curly brace, not bracket) is
> good enough.

What I'm worried about is whether we'll eventually want some sort of function and an object with the same name, and then have to have a syntax problem with legacy functions being confusing.

Show 5 quoted lines
> We need to see how useful this would be in practice; we would
> not want to add new syntax without a set of convincing use
> cases.  At this point, it still feels as if it is a feature that
> was implemented only because it could, not because there was a
> real need.

I'd be a lot more reliable at using git if git-commit reported "git log --pretty=oneline HEAD^{push}..HEAD" after each commit (if there is a HEAD^{push}). I'm forever committing things and forgetting to push them when I mean to. My original series actually ended with adding something to git-commit.sh, but I decided I didn't like the implementation of that actual patch.

I didn't have a particular need for ^{merge}, but I accidentally wrote it first because I was confused as to what I wanted. I think "git diff HEAD^{merge}" might be good for finding out what work you've done that hasn't gotten in yet.

Of course, for particular cases, it's just as easy to type the actual tracking branch name on the command line, but ^{push} and ^{merge} can be used genericly in scripts, because the same common or pattern works for any branch.

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “Support config-based names”
  1. 0/3 Support config-based namesDaniel Barkalow, Jun 12, 2007
  2. Shawn O. PearceJun 12, 2007
  3. Daniel BarkalowJun 12, 2007
  4. Junio C HamanoJun 12, 2007
  5. Daniel BarkalowJun 12, 2007
  6. Junio C HamanoJun 12, 2007

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.