Fossil SCM
Explained --no-merges vs --first-parent in Case Study 1 of the gitusers doc.
Commit
d09431bb0829382ec5107b2e3833f409ea6a9613ec2b8b52e624a1d207ba2c32
Parent
52bf1c0c34766ac…
1 file changed
+9
+9
| --- www/gitusers.md | ||
| +++ www/gitusers.md | ||
| @@ -846,10 +846,19 @@ | ||
| 846 | 846 | on [Git’s own repository][gitgh]: it gives [this commit][grpgh]! Though |
| 847 | 847 | GitHub shows the date we asked for, the `git show` command above gives |
| 848 | 848 | the confusing result referenced in the story. |
| 849 | 849 | This fixup within GitHub is success, of a sort, though it leaves us wondering why there’s a |
| 850 | 850 | discrepancy. |
| 851 | + | |
| 852 | +You may have noticed the difference between my story’s final command and | |
| 853 | +the one given on Stack Overflow: `--first-parent` versus `--no-merges`. | |
| 854 | +As far as I can tell, the SO answer is wrong, a conclusion I came to | |
| 855 | +while writing this reply and finding that it didn’t do what I expected. | |
| 856 | +None of the answers on that page give the `--no-merges` option. This is | |
| 857 | +one of the sneaky problems with complicated commands: people copy them | |
| 858 | +around from place to place without trying to understand them first, so | |
| 859 | +errors propagate. | |
| 851 | 860 | |
| 852 | 861 | But hark! The same Stack Overflow answer gives a much simpler |
| 853 | 862 | alternative based on Git’s [`rev-parse` feature][grp]: |
| 854 | 863 | |
| 855 | 864 | git checkout master@{2020-04-12} |
| 856 | 865 |
| --- www/gitusers.md | |
| +++ www/gitusers.md | |
| @@ -846,10 +846,19 @@ | |
| 846 | on [Git’s own repository][gitgh]: it gives [this commit][grpgh]! Though |
| 847 | GitHub shows the date we asked for, the `git show` command above gives |
| 848 | the confusing result referenced in the story. |
| 849 | This fixup within GitHub is success, of a sort, though it leaves us wondering why there’s a |
| 850 | discrepancy. |
| 851 | |
| 852 | But hark! The same Stack Overflow answer gives a much simpler |
| 853 | alternative based on Git’s [`rev-parse` feature][grp]: |
| 854 | |
| 855 | git checkout master@{2020-04-12} |
| 856 |
| --- www/gitusers.md | |
| +++ www/gitusers.md | |
| @@ -846,10 +846,19 @@ | |
| 846 | on [Git’s own repository][gitgh]: it gives [this commit][grpgh]! Though |
| 847 | GitHub shows the date we asked for, the `git show` command above gives |
| 848 | the confusing result referenced in the story. |
| 849 | This fixup within GitHub is success, of a sort, though it leaves us wondering why there’s a |
| 850 | discrepancy. |
| 851 | |
| 852 | You may have noticed the difference between my story’s final command and |
| 853 | the one given on Stack Overflow: `--first-parent` versus `--no-merges`. |
| 854 | As far as I can tell, the SO answer is wrong, a conclusion I came to |
| 855 | while writing this reply and finding that it didn’t do what I expected. |
| 856 | None of the answers on that page give the `--no-merges` option. This is |
| 857 | one of the sneaky problems with complicated commands: people copy them |
| 858 | around from place to place without trying to understand them first, so |
| 859 | errors propagate. |
| 860 | |
| 861 | But hark! The same Stack Overflow answer gives a much simpler |
| 862 | alternative based on Git’s [`rev-parse` feature][grp]: |
| 863 | |
| 864 | git checkout master@{2020-04-12} |
| 865 |