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

Re: Does GIT has vc keywords like CVS/Subversion?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 9, 2006, 22:48 UTC
Message-ID
<Pine.LNX.4.63.0610100045430.14200@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<46a038f90610091408y29f60a12gea7040b5412331c6@mail.gmail.com>
Hi,
On Tue, 10 Oct 2006, Martin Langhoff wrote:
Show 5 quoted lines
> On 10/10/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
> >  - outside of the SCM, keyword substitution can make sense, but doing it
> >    should be in helper scripts or something that can easily tailor it for
> >    the actual need of that particular project.
... like a pre-commit hook.
Show 5 quoted lines
> If we have a tool that I can pass a file or a directory tree and will 
> find the (perfectly|closely) matching trees and related commits.
> 
> For the single file case, searching for an exact SHA1 match is easy,
> as is by path.

If you have the path, you can reuse the whole algorithm for finding the best delta base.

However, if you do not have the path, you might as well just give up (if there is no perfect match for the SHA1), since the SHA1 is _not_ similar for similar contents. IOW, you'd literally have to search _all_ objects in the repository, which usually takes a long, long time.

Ciao, Dscho

Previous: Martin LanghoffNext: Martin Langhoff
Message 6 of 12 in “Does GIT has vc keywords like CVS/Subversion?”
  1. Dongsheng SongOct 9, 2006
  2. Liu YubaoOct 9, 2006
  3. Petr BaudisOct 9, 2006
  4. Linus TorvaldsOct 9, 2006
  5. Martin LanghoffOct 9, 2006
  6. Johannes SchindelinOct 9, 2006
  7. Martin LanghoffOct 9, 2006
  8. Junio C HamanoOct 9, 2006
  9. Rene ScharfeOct 10, 2006
  10. Shawn PearceOct 10, 2006
  11. Linus TorvaldsOct 10, 2006
  12. Junio C HamanoOct 10, 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.