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

Re: [PATCH] git-fetch: print the new and old ref when fast-forwarding

From
Junio C Hamano <junkio@cox.net>
Date
Feb 25, 2006, 20:53 UTC
Message-ID
<7vlkvz6tyr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0602252107110.17999@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
>> This is useful when you check out new changes with gitk.
>> Just copy/paste the old ref into gitk from the terminal.
>
> Why does "gitk ORIG_HEAD..HEAD" not work? (It also does the correct thing 
> when pulling...)

For most projects and repositories with single interesting head, that would work just fine.

If you use additional Pull: lines to track more than one remote refs, this patch would help.

For example, if you are tracking my "next" while keeping an eye on my "master" and "pu", your .git/remotes/origin file may have something like this:

	URL: git://git.kernel.org/pub/scm/git/git.git
        Pull: next:origin
        Pull: master:ko-master
        Pull: pu:ko-pu

When "git pull origin" pulls my next branch into your current branch (typically "master"), it also fast forwards your tracking branches ko-master and ko-pu. If you want to see what I merged in the meantime, you would want to get the old value of ko-master and the new value and feed them to gitk (or git log). ORIG_HEAD in this case was the old value of _your_ current branch head, and is not useful to see what happened to my master branch.

Previous: Johannes Schindelin
Message 3 of 3 in “git-fetch: print the new and old ref when fast-forwarding”
  1. git-fetch: print the new and old ref when fast-forwardingLukas Sandström, Feb 25, 2006
  2. Johannes SchindelinFeb 25, 2006
  3. Junio C HamanoFeb 25, 2006

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.