Closed jclsn closed 2 months ago
No, that's not how Git works. Commits know about their parents but not their children. You can find children by hunting through the history of a branch, but which branch to hunt through is subjective. For example, the children that exist on main
and the children that exist on dev
might be different.
I see. Would just have a nice way to jump back and forward through my merge request without having to open the browser. Works with :Gclog
and the quickfix list, but for the kernel this is not usable.
Ah :Gclog -n 100
works like a charm
Alternatively you can use :Gclog ^!
to stop at the currently edited commit rather than after 100 commits.
How does that work? I don't understand what is meant by "currently edited commit". For me it just shows nothing
Where are you using the -
map?
I have my command Glog :Git log --oneline --decorate --graph -500
command and I am using it in there
A command doesn't answer the question. What buffer are you using the -
map in? The first result?
In the buffer of the diff, but no matter in which buffer I execute :Gclog ^!
in, it just returns me an empty buffer
In the buffer of the diff,
The first buffer that opens is the top most commit. It has no children. So it will not list anything.
but no matter in which buffer I execute
:Gclog ^!
in, it just returns me an empty buffer
Are you just trying it in random files? Those don't have child commits either.
The first buffer that opens is the top most commit. It has no children. So it will not list anything.
I did not try in the first commit, but in one further down.
Are you just trying it in random files? Those don't have child commits either.
I have been trying in many commits and files now. The list is alway empty
I guess it needs a starting point too. Try :Gclog @ ^!
to use the currently checked out branch.
Yep, that works! Thx
On Aug. 19 2024, at 6:07 pm, Tim Pope @.***> wrote:
I guess it needs a starting point too. Try :Gclog @ ^! to use the currently checked out branch. — Reply to this email directly, view it on GitHub (https://github.com/tpope/vim-fugitive/issues/2328#issuecomment-2296932971), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AEW47N76HZ26OYZN4RNDMPDZSIJ43AVCNFSM6AAAAABMPZWE66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWHEZTEOJXGE). You are receiving this because you authored the thread.
I have found that you can navigate down the commit history by pressing
-
. This mapping is undocumented in seems and there also is not counterpart+
. Would it be possible to create one?I have looked at the
NavigateUp
andDirRev
functions, but it is not obvious to me how to achieve that.