{"thread":{"id":"14691","subject":"[SCRIPT] git-upstream: prints the tracking chain starting at the named ref","startedAt":"2008-07-26T14:44:29Z","lastAt":"2008-07-26T16:39:54Z","messageCount":2,"participants":["Scott Collins","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"85079","messageId":"26F09105-BFA2-4FA2-86AA-B9E6F9DE3762@slashdot.org","threadId":"14691","inReplyTo":null,"subject":"[SCRIPT] git-upstream: prints the tracking chain starting at the named ref","fromName":"Scott Collins","fromEmail":"scc@slashdot.org","sentAt":"2008-07-26T14:44:29Z","receivedAt":"2008-07-26T14:44:29Z","isPatch":false,"sender":{"key":"scc@slashdot.org","avatar":null},"body":"Howdy, all.\n\nHere's a script I've sort of `grown' over the past few weeks.\n\nI use it to quickly see where a tracking branch stands with respect to  \nupstream refs _without_ actually fetching or even switching to the  \ntracking branch.  This may not be useful for everyones' work-flows;  \nbut I find it handy. I'm posting because it may be of use to others  \n(and feedback, if any, can only improve it).\n\nExample:\n\n\t$ git upstream -v --abbrev master\n\tce567d1... master* is behind 'origin/master' by 17 commits, and can  \nbe fast-forwarded.\n\t186458b... origin/master\n\t186458b... master@origin, git://git.kernel.org/pub/scm/git/git.git\n\nFor more info, try: git upstream -v -h\n\nIt's a perl script and uses Git.pm.  Tries to fit into git standard  \npractices.  Supports colors (defaults to color like git branch),  \nconfigs.  It has a few rough edges, but it's very usable.  The tiny  \npause before printing a remote tracking branch is ls-remote.  I hope  \nthe name doesn't conflict with anything.\n\nI apologize for attaching rather than inserting in-line; but this is a  \ncomplete file, not a patch and I also don't trust my mailer :-(\n\n\n\n\n\n\n\nhopefully someone else finds this useful :-)\n_____________\nScott Collins"},{"id":"85088","messageId":"20080726163954.GA32184@machine.or.cz","threadId":"14691","inReplyTo":"26F09105-BFA2-4FA2-86AA-B9E6F9DE3762@slashdot.org","subject":"Re: [SCRIPT] git-upstream: prints the tracking chain starting at the named ref","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-07-26T16:39:54Z","receivedAt":"2008-07-26T16:39:54Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\nOn Sat, Jul 26, 2008 at 10:44:29AM -0400, Scott Collins wrote:\n> Here's a script I've sort of `grown' over the past few weeks.\n>\n> I use it to quickly see where a tracking branch stands with respect to \n> upstream refs _without_ actually fetching or even switching to the tracking \n> branch.  This may not be useful for everyones' work-flows; but I find it \n> handy. I'm posting because it may be of use to others (and feedback, if \n> any, can only improve it).\n\n  I wonder why is it a problem to fetch first in your workflow? If there\nis nothing for a fetch, git-upstream is going to be as fast as git fetch\n&& git branch, if there is something for a fetch, you probably want to\nfetch anyway if you're running this script.\n\n  Note that in very recent Git trees, git branch -v will show some\ntracking information, however it could use quite some improvement (print\nsomething even if the branch equals the remote branch, print the\nahead/behind combination in case the branch does not fast-forward) -\nmaybe it might be more effective to enhance that instead?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nAs in certain cults it is possible to kill a process if you know\nits true name.  -- Ken Thompson and Dennis M. Ritchie\n"}]}