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

Re: [SCRIPT] git-upstream: prints the tracking chain starting at the named ref

From
Petr Baudis <pasky@suse.cz>
Date
Jul 26, 2008, 16:39 UTC
Message-ID
<20080726163954.GA32184@machine.or.cz>
In-Reply-To
<26F09105-BFA2-4FA2-86AA-B9E6F9DE3762@slashdot.org>
  Hi,
On Sat, Jul 26, 2008 at 10:44:29AM -0400, Scott Collins wrote:
Show 7 quoted lines
> Here's a script I've sort of `grown' over the past few weeks.
>
> I use it to quickly see where a tracking branch stands with respect to 
> upstream refs _without_ actually fetching or even switching to the tracking 
> branch.  This may not be useful for everyones' work-flows; but I find it 
> handy. I'm posting because it may be of use to others (and feedback, if 
> any, can only improve it).
  I wonder why is it a problem to fetch first in your workflow? If there
is nothing for a fetch, git-upstream is going to be as fast as git fetch
&& git branch, if there is something for a fetch, you probably want to
fetch anyway if you're running this script.
  Note that in very recent Git trees, git branch -v will show some
tracking information, however it could use quite some improvement (print
something even if the branch equals the remote branch, print the
ahead/behind combination in case the branch does not fast-forward) -
maybe it might be more effective to enhance that instead?
-- 
				Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name.  -- Ken Thompson and Dennis M. Ritchie
Previous: Scott Collins
Message 2 of 2 in “[SCRIPT] git-upstream: prints the tracking chain starting at the named ref”
  1. Scott CollinsJul 26, 2008
  2. Petr BaudisJul 26, 2008

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.