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

Re: tracking branch for a rebase

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 11, 2009, 04:54 UTC
Message-ID
<7vy6om2ia2.fsf@alter.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0909100941330.8306@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> How about ^^branch? *ducks*
You'd better duck.

Just like %branch, it is a selfish and short-sighted "good enough for this particular case but there is no room for extending it" hack that I have serious problem with. It closes the door for people who come later, and such an attitude is okay only if this is _the last great invention_ and there is no more great feature that deserves short-and-sweet notation to come. It might be the _latest_ great invention, but chances are that it won't be the last.

> Seriously again, I think that ^{tracking} (with shorthand ^t, maybe) is 
> not too shabby an option.  The point is: if we make this unattractive 
> enough by requiring a lot of typing, we will never get to the point where 
> it is popular enough to make a shorthand: it just will not be used at all.
I actually think it is the other way around.

If it is so useful to be able to specify the ref your branch is based on by applying a magic to the name of your branch, the users will use it even if it is rather long to type, as long as the feature is easy to discover and remember, and then they will demand a short-hand.

If on the other hand users say "Hey, I know can say 'git log X@{upstream}' but why bother? I always build my branch X on top of origin/X anyway, so I'd forego that feature and type 'git log origin/X'. It's not worth my time to type that long magic," then the feature is not as useful as you hoped. And there is no point in coming up with a short-hand syntax for it.

I personally suspect that users love to use the feature _despite_ the initial lack of short-hand, and we would end up adding some short-hand, and that would be a far better proof that the feature itself is useful than "it is used just %X happens to be shorter than origin/X".

But before that happens, I'd rather not waste short-hand notations, such as @{t} or @{u}, that will be in short-supply in the longer term.

Previous: Johannes SchindelinNext: Junio C Hamano
Message 38 of 39 in “tracking branch for a rebase”
  1. Pete WyckoffSep 4, 2009
  2. Michael J GruberSep 4, 2009
  3. Jeff KingSep 4, 2009
  4. Björn SteinbrinkSep 4, 2009
  5. Jeff KingSep 5, 2009
  6. Björn SteinbrinkSep 5, 2009
  7. Jeff KingSep 5, 2009
  8. Junio C HamanoSep 7, 2009
  9. Michael J GruberSep 7, 2009
  10. Junio C HamanoSep 7, 2009
  11. Jeff KingSep 7, 2009
  12. Michael J GruberSep 7, 2009
  13. Jeff KingSep 7, 2009
  14. Johannes SchindelinSep 7, 2009
  15. Michael J GruberSep 7, 2009
  16. Julian PhillipsSep 8, 2009
  17. Jeff KingSep 9, 2009
  18. Junio C HamanoSep 10, 2009
  19. Johannes SchindelinSep 10, 2009
  20. Introduce <branch>@{tracked} as shortcut to the tracked branchJohannes Schindelin, Sep 10, 2009
  21. Michael J GruberSep 10, 2009
  22. Johannes SchindelinSep 10, 2009
  23. Johan HerlandSep 10, 2009
  24. Michael J GruberSep 10, 2009
  25. Johan HerlandSep 10, 2009
  26. Johannes SchindelinSep 10, 2009
  27. Michael J GruberSep 10, 2009
  28. Jeff KingSep 10, 2009
  29. Junio C HamanoSep 10, 2009
  30. Björn SteinbrinkOct 2, 2009
  31. Jeff KingSep 10, 2009
  32. Jeff KingSep 10, 2009
  33. Johannes SchindelinSep 10, 2009
  34. Introduce <branch>@{upstream} as shortcut to the tracked branchJohannes Schindelin, Sep 10, 2009
  35. Jeff KingSep 10, 2009
  36. Johannes SchindelinSep 10, 2009
  37. Johannes SchindelinSep 10, 2009
  38. Junio C HamanoSep 11, 2009
  39. Junio C HamanoSep 5, 2009

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.