Fossil SCM
Clarity and accuracy pass on the git-worktree issue in fossil-v-git.wiki.
Commit
92dc1021580c8c68e02b06cc2cdd94d1b1c378e1c2ce49d1bff90cb6e5c9e9d5
Parent
3609ff75608d351…
1 file changed
+32
-25
+32
-25
| --- www/fossil-v-git.wiki | ||
| +++ www/fossil-v-git.wiki | ||
| @@ -486,38 +486,45 @@ | ||
| 486 | 486 | tightly focused and cohesive implementation. |
| 487 | 487 | |
| 488 | 488 | |
| 489 | 489 | <h3 id="checkouts">2.6 One vs. Many Check-outs per Repository</h3> |
| 490 | 490 | |
| 491 | -A "repository" in Git is a pile-of-files in the ".git" subdirectory | |
| 492 | -of a single check-out. The check-out and the repository are located | |
| 493 | -together in the filesystem. | |
| 494 | - | |
| 495 | -With Fossil, a "repository" is a single SQLite database file | |
| 496 | -that can be stored anywhere. There | |
| 497 | -can be multiple active check-outs from the same repository, perhaps | |
| 498 | -open on different branches or on different snapshots of the same branch. | |
| 491 | +A "repository" in Git is a pile-of-files in the <tt>.git</tt> | |
| 492 | +subdirectory of a single check-out. The working check-out directory and | |
| 493 | +the <tt>.git</tt> repository subdirectory are normally in the same | |
| 494 | +directory within the filesystem. | |
| 495 | + | |
| 496 | +With Fossil, a "repository" is a single SQLite database file that can be | |
| 497 | +stored anywhere. There can be multiple active check-outs from the same | |
| 498 | +repository, perhaps open on different branches or on different snapshots | |
| 499 | +of the same branch. It is common in Fossil to switch branches with a | |
| 500 | +"<tt>cd</tt>" command between two check-out directories rather than | |
| 501 | +switching to another branch in place within a single working directory. | |
| 499 | 502 | Long-running tests or builds can be running in one check-out while |
| 500 | 503 | changes are being committed in another. |
| 501 | 504 | |
| 502 | -Git version 2.5 adds a feature to emulate Fossil's decoupling of the | |
| 503 | -repository from the check-out tree, which it calls | |
| 504 | -"[https://git-scm.com/docs/git-worktree|git-worktree]." This command | |
| 505 | -sets up a series of links in the filesystem to | |
| 506 | -allow a single repository to host multiple check-outs. However, | |
| 507 | -the interface is sufficiently difficult to use that most people | |
| 508 | -find it easier to create a separate clone for each check-out. | |
| 509 | -There are also practical consequences of the way it's implemented | |
| 510 | -that make worktrees not quite equivalent to the main Git repo + checkout | |
| 511 | -tree. | |
| 512 | - | |
| 513 | -With Fossil, the complete decoupling of repository and check-out tree | |
| 514 | -means every working check-out tree is treated equally. It's common in | |
| 515 | -Fossil to have a check-out tree for each major working branch so that | |
| 516 | -you can switch branches with a "cd" command rather than replace the | |
| 517 | -current working file set with a different file set by updating in place, | |
| 518 | -as Git prefers. | |
| 505 | +From the start, Git has allowed symlinks to this <tt>.git</tt> directory | |
| 506 | +from multiple working directories. The <tt>git init</tt> command offers | |
| 507 | +the <tt>--separate-git-dir</tt> option to set this up automatically. | |
| 508 | +Then in version 2.5, Git added the | |
| 509 | +"[https://git-scm.com/docs/git-worktree|git-worktree]" feature to | |
| 510 | +provide a higher-level management interface atop this basic mechanism. | |
| 511 | +Use of this more closely emulates Fossil's decoupling of repository and | |
| 512 | +working directory, but the fact remains that it is far more common in | |
| 513 | +Git usage to simply switch a single working directory among branches in | |
| 514 | +place. | |
| 515 | + | |
| 516 | +The main downside of that working style is that it invalidates all build | |
| 517 | +objects created from files that change in switching between branches. | |
| 518 | +When you have multiple working directories for a single repository, you | |
| 519 | +can have a completely independent state in each working directory which | |
| 520 | +is untouched by the "<tt>cd</tt>" command you use to switch among them. | |
| 521 | + | |
| 522 | +There are also practical consequences of the way <tt>.git</tt> links | |
| 523 | +work that make multiple working directories in Git | |
| 524 | +[https://duckduckgo.com/?q=git+worktree+problem | not quite | |
| 525 | +interchangeable], as they are in Fossil. | |
| 519 | 526 | |
| 520 | 527 | |
| 521 | 528 | <h3 id="history">2.7 What you should have done vs. What you actually did</h3> |
| 522 | 529 | |
| 523 | 530 | Git puts a lot of emphasis on maintaining |
| 524 | 531 |
| --- www/fossil-v-git.wiki | |
| +++ www/fossil-v-git.wiki | |
| @@ -486,38 +486,45 @@ | |
| 486 | tightly focused and cohesive implementation. |
| 487 | |
| 488 | |
| 489 | <h3 id="checkouts">2.6 One vs. Many Check-outs per Repository</h3> |
| 490 | |
| 491 | A "repository" in Git is a pile-of-files in the ".git" subdirectory |
| 492 | of a single check-out. The check-out and the repository are located |
| 493 | together in the filesystem. |
| 494 | |
| 495 | With Fossil, a "repository" is a single SQLite database file |
| 496 | that can be stored anywhere. There |
| 497 | can be multiple active check-outs from the same repository, perhaps |
| 498 | open on different branches or on different snapshots of the same branch. |
| 499 | Long-running tests or builds can be running in one check-out while |
| 500 | changes are being committed in another. |
| 501 | |
| 502 | Git version 2.5 adds a feature to emulate Fossil's decoupling of the |
| 503 | repository from the check-out tree, which it calls |
| 504 | "[https://git-scm.com/docs/git-worktree|git-worktree]." This command |
| 505 | sets up a series of links in the filesystem to |
| 506 | allow a single repository to host multiple check-outs. However, |
| 507 | the interface is sufficiently difficult to use that most people |
| 508 | find it easier to create a separate clone for each check-out. |
| 509 | There are also practical consequences of the way it's implemented |
| 510 | that make worktrees not quite equivalent to the main Git repo + checkout |
| 511 | tree. |
| 512 | |
| 513 | With Fossil, the complete decoupling of repository and check-out tree |
| 514 | means every working check-out tree is treated equally. It's common in |
| 515 | Fossil to have a check-out tree for each major working branch so that |
| 516 | you can switch branches with a "cd" command rather than replace the |
| 517 | current working file set with a different file set by updating in place, |
| 518 | as Git prefers. |
| 519 | |
| 520 | |
| 521 | <h3 id="history">2.7 What you should have done vs. What you actually did</h3> |
| 522 | |
| 523 | Git puts a lot of emphasis on maintaining |
| 524 |
| --- www/fossil-v-git.wiki | |
| +++ www/fossil-v-git.wiki | |
| @@ -486,38 +486,45 @@ | |
| 486 | tightly focused and cohesive implementation. |
| 487 | |
| 488 | |
| 489 | <h3 id="checkouts">2.6 One vs. Many Check-outs per Repository</h3> |
| 490 | |
| 491 | A "repository" in Git is a pile-of-files in the <tt>.git</tt> |
| 492 | subdirectory of a single check-out. The working check-out directory and |
| 493 | the <tt>.git</tt> repository subdirectory are normally in the same |
| 494 | directory within the filesystem. |
| 495 | |
| 496 | With Fossil, a "repository" is a single SQLite database file that can be |
| 497 | stored anywhere. There can be multiple active check-outs from the same |
| 498 | repository, perhaps open on different branches or on different snapshots |
| 499 | of the same branch. It is common in Fossil to switch branches with a |
| 500 | "<tt>cd</tt>" command between two check-out directories rather than |
| 501 | switching to another branch in place within a single working directory. |
| 502 | Long-running tests or builds can be running in one check-out while |
| 503 | changes are being committed in another. |
| 504 | |
| 505 | From the start, Git has allowed symlinks to this <tt>.git</tt> directory |
| 506 | from multiple working directories. The <tt>git init</tt> command offers |
| 507 | the <tt>--separate-git-dir</tt> option to set this up automatically. |
| 508 | Then in version 2.5, Git added the |
| 509 | "[https://git-scm.com/docs/git-worktree|git-worktree]" feature to |
| 510 | provide a higher-level management interface atop this basic mechanism. |
| 511 | Use of this more closely emulates Fossil's decoupling of repository and |
| 512 | working directory, but the fact remains that it is far more common in |
| 513 | Git usage to simply switch a single working directory among branches in |
| 514 | place. |
| 515 | |
| 516 | The main downside of that working style is that it invalidates all build |
| 517 | objects created from files that change in switching between branches. |
| 518 | When you have multiple working directories for a single repository, you |
| 519 | can have a completely independent state in each working directory which |
| 520 | is untouched by the "<tt>cd</tt>" command you use to switch among them. |
| 521 | |
| 522 | There are also practical consequences of the way <tt>.git</tt> links |
| 523 | work that make multiple working directories in Git |
| 524 | [https://duckduckgo.com/?q=git+worktree+problem | not quite |
| 525 | interchangeable], as they are in Fossil. |
| 526 | |
| 527 | |
| 528 | <h3 id="history">2.7 What you should have done vs. What you actually did</h3> |
| 529 | |
| 530 | Git puts a lot of emphasis on maintaining |
| 531 |