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

Re: git-rev-list in local commit order

From
Linus Torvalds <torvalds@osdl.org>
Date
May 16, 2005, 23:46 UTC
Message-ID
<Pine.LNX.4.58.0505161638090.18337@ppc970.osdl.org>
In-Reply-To
<1629.10.10.10.24.1116278725.squirrel@linux1>
On Mon, 16 May 2005, Sean wrote:
Show 6 quoted lines
> 
> And you also haven't addressed what to do when someone else uses say,
> Linus' repoid, as their own.  It seems like a risk to have the operation
> of each repository depend on a value anyone else can duplicate.  Linus
> can't control what repoid everyone else uses, he can control the time on
> his own machine.  Unique repoid's are an illusion.

Yes. I'm not ahuge fan of the notion of "repo ID's". One reason is that I actually really really like the notion of anonymous repositories, so that when I do something stupid, and blow away one of my less successful repositories and continue with another one, nobody ever sees it (and yes, this happens - in my BK usage I occasionally cloned my repo for some testing, and then ended up using the _cloned_ repo for the real work, and totally blowing away ymy original one, and renamed my cloned one back to where my main one is).

That said, while I actually think that time/date matters, I don't think it should matter a lot.

I don't see why people don't just use the "committer" name for this. That's really what you want, and it ends up being a very good approximation of "repository ID" for a commit. Sure, people end up having multiple reposiories, and thus you'll occasionally see merges that end up merging two heads with the same "repo ID", but does anybody really care? I doubt it.

For example, if you have a company Q&A policy that says that you want to keep commits to different repos separate, just make sure that those repos are on different machines or are accessed with different users. Or write some simple wrapper scripts that make sure to set GIT_COMMITTER_EMAIL to the proper value (say, the wrapper could be as simple as

	#!/bin/sh
	export GIT_COMMITTER_EMAIL=$(cat .git/committer_email)
	real-git-commit "$@"

and then you just create a ".git/committer_email" file per repository that contains the "repo ID" you want to fake.

		Linus
Previous: SeanNext: Thomas Gleixner
Message 12 of 17 in “git-rev-list in local commit order”
  1. SeanMay 14, 2005
  2. Thomas GleixnerMay 15, 2005
  3. SeanMay 15, 2005
  4. Thomas GleixnerMay 15, 2005
  5. SeanMay 15, 2005
  6. Thomas GleixnerMay 15, 2005
  7. SeanMay 15, 2005
  8. Thomas GleixnerMay 15, 2005
  9. SeanMay 15, 2005
  10. Thomas GleixnerMay 15, 2005
  11. SeanMay 16, 2005
  12. Linus TorvaldsMay 16, 2005
  13. Thomas GleixnerMay 17, 2005
  14. Linus TorvaldsMay 17, 2005
  15. Thomas GleixnerMay 17, 2005
  16. Linus TorvaldsMay 17, 2005
  17. Jon SeymourMay 18, 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.