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

Re: Comments on "Understanding Version Control" by Eric S. Raymond

From
Theodore Tso <tytso@mit.edu>
Date
Feb 5, 2009, 21:45 UTC
Message-ID
<20090205214536.GB9814@mit.edu>
In-Reply-To
<200902051836.44973.jnareb@gmail.com>
On Thu, Feb 05, 2009 at 06:36:42PM +0100, Jakub Narebski wrote:
> What I wonder is how directory-id solution deals with situation
> where (for example die to some reorganization) where once was single
> directory (e.g. lib/) now there are two (include/ and src/); how it
> would deal with the new file at old directory, hmmm...?

In that case, it wouldn't be a directory rename, it would be a series of file moves. So in a hypothetical scm that recorded all of these sorts of things, you'd have something like this:

scm mv lib/*.c src scm mv lib/*.h include scm rmdir lib

Now if you try merging in a commit that creates a files in lib (e.g., creates lib/foo.c and lib/foo.h and modifies lib/Makefile), presumably either a super smart hueristic algorith might be able to figure out the pattern and drop the new files in src and include --- or, more likely, it would flag a merge conflict and ask the user to figure it out by hand.

So yes, there will always be cases where directory-id won't be able to handle a hypothetical source tree reorganization. It really only helps in the case where you are doing a true, full move of the directory, i.e.:

scm mvdir src/plugin/innodb src/plugin/innodb-legacy scm mvdir src/plugin/innodb-experimental src/plugin/innodb

							- Ted
Previous: Jakub NarebskiNext: Jakub Narebski
Message 19 of 21 in “Comments on "Understanding Version Control" by Eric S. Raymond”
  1. Jakub NarebskiFeb 2, 2009
  2. Theodore TsoFeb 2, 2009
  3. Eric S. RaymondFeb 2, 2009
  4. Jakub NarebskiFeb 3, 2009
  5. Jakub NarebskiFeb 4, 2009
  6. Theodore TsoFeb 4, 2009
  7. Junio C HamanoFeb 5, 2009
  8. Theodore TsoFeb 5, 2009
  9. Junio C HamanoFeb 5, 2009
  10. Theodore TsoFeb 5, 2009
  11. Junio C HamanoFeb 5, 2009
  12. Jakub NarebskiFeb 5, 2009
  13. Theodore TsoFeb 5, 2009
  14. Miles BaderFeb 5, 2009
  15. Eric S. RaymondFeb 5, 2009
  16. Jakub NarebskiFeb 5, 2009
  17. Theodore TsoFeb 5, 2009
  18. Jakub NarebskiFeb 5, 2009
  19. Theodore TsoFeb 5, 2009
  20. Tests for "Understanding Version Control" by Eric S. RaymondJakub Narebski, Feb 4, 2009
  21. Jakub NarebskiFeb 10, 2009

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.