简体   繁体   English

混帐日志<commit-hash> ^..HEAD 顺序<commit-hash>

[英]git log <commit-hash>^..HEAD order of <commit-hash>

Based on this question / answers How to list commits since certain commit?基于这个问题/答案如何列出自特定提交以来的提交? I want to get commits from specific <commit-hash> , including this <commit-hash> commit.我想从特定的<commit-hash>获得提交,包括这个<commit-hash>提交。

Using this command:使用这个命令:

git log <commit-hash>^..HEAD --pretty=oneline

I get result with <commit-hash> not being the last line of the output.我得到的结果<commit-hash>不是输出的最后一行。

What can be reason of this?这可能是什么原因?

Asking for --boundary commits will often do what you want,要求--boundary提交通常会做你想做的事,

git log --oneline --graph --boundary master..

will show the base commit, only problem is it'll show any merge boundaries too so in more active projects it becomes less useful for visualization (but it gets great for setting up eg bisect boundaries).将显示基本提交,唯一的问题是它也会显示任何合并边界,因此在更活跃的项目中,它对可视化变得不太有用(但它对于设置例如平分边界非常有用)。

Tops on my idle-wishlist enhancements for git's rev-list-based commands is a --boundary-first or something option to show boundary commits but only if they're found via first-parent links.对于基于 git rev-list 的命令,我的 idle-wishlist 增强功能的--boundary-first--boundary-first或显示边界提交的选项,但--boundary-first是它们是通过第一父链接找到的。

edit: add --graph to your log display to see more about how git log found what it's listing.编辑:将--graph添加到您的日志显示中以查看有关git log如何找到它列出的内容的更多信息。

Because the parent revision of <commit-hash> is the direct parent of multiple children that need to be listed in the output and one of them happens to outsort (for lack of a better word) the one you are working from.因为<commit-hash>的父修订版是需要在输出中列出的多个子项的直接父项,并且其中一个恰好超出了您正在使用的那个(因为缺少更好的词)。 Check if that is the the case by checking the parents of the other unexpected revision that is listed there.通过检查此处列出的其他意外修订的父级来检查是否是这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM