Re: [GSoC] Interest in "More Sparse Index Integrations" project idea
- From
Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
- Date
- Feb 16, 2022, 03:01 UTC
- Message-ID
- <CAJyCBOSPqP4Rh5ZQhj-DexXXtkwCJTT3tL7DToREfsRR6Hozxg@mail.gmail.com>
- In-Reply-To
- <e81f044d-8c3a-90df-ff9e-719b613807d6@gmail.com>
On Tue, Feb 15, 2022 at 2:45 AM Philippe Blain <levraiphilippeblain@gmail.com> wrote:
Show 7 quoted lines
> Or even better (you do not have to guess the number of commits in > each series): > > git log --oneline --graph 3c0e4178277^- > > (see [1]). Why that syntax seems to completely ignore '--graph', > though is beyond me!
I read the [1] and this "<rev>^-" syntax seems to exclude the first parent of <rev>. In another word, it only gets the part of history within the checked-out new branch, i.e. "This is typically useful for merge commits where you can just pass <commit>^- to get all the commits in the branch that was merged in merge commit <commit> (including <commit> itself)."
It seems that the checked-out branch has a linear clean history, and that's why it looks like "completely ignore '--graph'". Actually, it does not ignore "--graph", e.g.
with "--graph":
* 3c0e417827 Merge branch 'ds/fetch-pull-with-sparse-index' * 408c51f0b4 test-read-cache: remove --table, --expand options * c2a2940510 t1091/t3705: remove 'test-tool read-cache --table' * 3a9a6ac5d9 t1092: replace 'read-cache --table' with 'ls-files --sparse' * 78087097b8 ls-files: add --sparse option * 5a4e0547e2 fetch/pull: use the sparse index
w/out "--graph":
3c0e417827 Merge branch 'ds/fetch-pull-with-sparse-index' 408c51f0b4 test-read-cache: remove --table, --expand options c2a2940510 t1091/t3705: remove 'test-tool read-cache --table' 3a9a6ac5d9 t1092: replace 'read-cache --table' with 'ls-files --sparse' 78087097b8 ls-files: add --sparse option 5a4e0547e2 fetch/pull: use the sparse index
Look at the asterisks prefixing every commit in the with "--graph" part. If you init a new repo and add a few commits to form a linear history, you will get a similar result by "git log --oneline --graph".
> [1] https://git-scm.com/docs/gitrevisions#Documentation/gitrevisions.txt-emltrevgt-ltngtemegemHEAD-HEAD-2em
-- Thanks & Regards, Shaoxuan