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

Fwd: Errors when diff'ing arbitrary upstream remotes are not intuitive if git pull --all hasn't been done

From
Y.yaneurabeya . <yanegomi@gmail.com>
Date
Oct 24, 2013, 18:07 UTC
Message-ID
<CAGH67wRwb1A9CzAfod_XLRVFBRyoEron8tmM+NbMGOeKDVf2Hg@mail.gmail.com>
In-Reply-To
<CAGH67wSf_RQigCmqRZKOpHdV9ELqE=078mkpwA4dfnUr=AvGVQ@mail.gmail.com>
Hi!
    I added an arbitrary upstream remote thinking that I could just
git diff the upstream remote's master. Turns out I needed to run git
pull --all in order to be able to diff the file (I forgot that step).
    Could this error message be improved for interactive commands by
first checking to see whether or not the path starts with a remote,
then recommend that the remote be pulled? If this seems sane, I could
whip up a patch and post it in a github pull request.
Thanks!
-Garrett

$ git remote add pkohut [...] $ git diff upstream/master -- conf/ | wc -l 16 $ git diff pkohut/master -- conf/ | wc -l fatal: bad revision 'pkohut/master' 0 $ git pull --all Fetching origin Fetching upstream Fetching pkohut ... $ git diff pkohut/master -- conf/ | wc -l 46 $ git --version; uname -a git version 1.7.9 CYGWIN_NT-6.1 ZL00757 1.7.25(0.270/5/3) 2013-08-31 20:37 x86_64 Cygwin

Next: Jeff King
Message 1 of 6 in “Fwd: Errors when diff'ing arbitrary upstream remotes are not intuitive if git pull --all hasn't been done”
  1. yaneurabeya .Oct 24, 2013
  2. Jeff KingOct 25, 2013
  3. Jeff KingOct 25, 2013
  4. Johan HerlandOct 25, 2013
  5. Jeff KingOct 25, 2013
  6. Johan HerlandOct 25, 2013

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.