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

Re: [RFC PATCH] Add support for figuring out where in the git archive we are

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 17, 2005, 00:01 UTC
Message-ID
<Pine.LNX.4.58.0508161655460.3553@g5.osdl.org>
In-Reply-To
<7vll315u3w.fsf@assigned-by-dhcp.cox.net>
On Tue, 16 Aug 2005, Junio C Hamano wrote:
> 
> Comments: Wouldn't that mean git-*-scripts would not benefit from this
>           because git-sh-setup would set GIT_DIR for you even if
>           you don't?

As it stands now, yes. But the point being that if people like this, then I'll just change the git-sh-setup-script accordingly. For example, once git-diff-tree also does the same thing, then "git-diff-script" would have no reason left to even call the current git-sh-setup-script at all, since the git-diff-* commands would basically do the setup _and_ report the errors that git-sh-setup-script does now.

> 	  If you can do "cd drivers && git-diff-files ../net"
> 	  that would be very useful.

I don't do that right now, but it's actually very easy to do in the setup_git_directory() function. It falls out very simply there - both the "./" and the "../" prefix would make tons of sense to handle there.

Do you want to take the current patch (which buys you very little because not a lot of stuff has been set up to deal with it, but is the basis for all future work anyway) or do you want me to polish it up a bit and re-submit the whole thing?

I'd do at least the "git-diff-tree" part and the "./" and "../" handling, and convert at least the "git diff" thing to the new world order and away from git-sh-setup-script?

		Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 10 in “Add support for figuring out where in the git archive we are”
  1. Add support for figuring out where in the git archive we areLinus Torvalds, Aug 16, 2005
  2. Yasushi SHOJIAug 16, 2005
  3. Junio C HamanoAug 16, 2005
  4. Linus TorvaldsAug 17, 2005
  5. Junio C HamanoAug 17, 2005
  6. Linus TorvaldsAug 17, 2005
  7. Junio C HamanoAug 17, 2005
  8. Linus TorvaldsAug 17, 2005
  9. Junio C HamanoAug 17, 2005
  10. Daniel BarkalowAug 17, 2005

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.