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

Re: [PATCH] Fix typo on variable name $newref should be $newrev in sample update hook

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 2, 2007, 16:44 UTC
Message-ID
<Pine.LNX.4.64.0703020839350.3953@woody.linux-foundation.org>
In-Reply-To
<200703021027.00203.andyparkins@gmail.com>
On Fri, 2 Mar 2007, Andy Parkins wrote:
>  			# ref that were previously not accessible
> -			git-rev-parse --not --all | git-rev-list --stdin --pretty $newref
> +			git-rev-parse --not --all | git-rev-list --stdin --pretty $newrev
Well, it should just avoid git-rev-parse these days and do
	git rev-list --pretty $newrev --not --all

instead. And quite frankly, rather than "git rev-list --pretty", there's no real reason not to do

	git log $newrev --not --all

unless there is some subtle issue with pagers (but none of this goes to a terminal?) in which case you'd have to disable that (and then rev-list is probably simpler and more readable than adding a "GIT_PAGER=" to the front).

		Linus
Previous: Andy ParkinsNext: Andy Parkins
Message 2 of 9 in “Fix typo on variable name $newref should be $newrev in sample update hook”
  1. Fix typo on variable name $newref should be $newrev in sample update hookAndy Parkins, Mar 2, 2007
  2. Linus TorvaldsMar 2, 2007
  3. Andy ParkinsMar 2, 2007
  4. Remove use of git-rev-parse and replace git-rev-list --pretty with git-logAndy Parkins, Mar 2, 2007
  5. Linus TorvaldsMar 2, 2007
  6. Junio C HamanoMar 2, 2007
  7. Andy ParkinsMar 3, 2007
  8. Junio C HamanoMar 3, 2007
  9. Linus TorvaldsMar 4, 2007

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.