linux – git:gitk有“按日期排序”的命令行选项吗?

linux – git:gitk有“按日期排序”的命令行选项吗?,第1张

概述我正在尝试为gitk找到一个命令行选项,该选项与“View / Edit view …”窗口中的“按日期严格排序”具有相同的效果. 与GUI中提供的选项相比,man gitk显示的选项数量非常有限. man gitk至少提到它确实采取与 git rev-list相同的选项,包括 --date-order This option is similar to --topo-order in the s 我正在尝试为gitk找到一个命令行选项,该选项与“VIEw / Edit vIEw …”窗口中的“按日期严格排序”具有相同的效果.

与GUI中提供的选项相比,man gitk显示的选项数量非常有限.

解决方法 man gitk至少提到它确实采取与 git rev-list相同的选项,包括
--date-order

This option is similar to --topo-order in the sense that no parent comes before all of its children,but otherwise things are still ordered in the commit timestamp order.

有关更多信息,请参见“Guide to understanding gitk?”.

注意:如果-d或–date-order确实是你所追求的参数,最好不要使用太多,根据linus本人(从lists-archives.com/git或www.spinics.net/lists/git/):

The thing is,--date-order strings out and mixes up the commits on the
same development chain,and by doing so it makes the different chains of
development much harder to see.
It also ends up showing the development in
a more “parallel” way,which in turn makes the vIEw even harder to read.

So I would suggest not using --date-order by default. It doesn’t add
anything to any normal flow,and it makes the big picture harder to see.

The only time you really want --date-order (or “-d“,which is shorthand
for it for just gitk) is really

when the big picture is really really simple,and you actually want to
see more detail because the big picture is too trivial to even be
interesting otherwise.
(In other words: --date-order is fine for really simple development
where there is only ever just a couple of branches or where you have
pruned away so much of the history that the remaining part is simple) when you want to deBUG “git rev-List” behavIoUr itself,since the date
order actually matters for how git traverses the commit chains.

The second case is something that I SUSPECT nobody but me and a few other
people have ever done.
I found it very useful together with --show-all when I was deBUGging the revision walker (see commits “07005” and “07006”,
where the first implements --show-all,and the second one is the end
result of my deBUGging).

In other words: never start out with “-d” or “--date-order” by default. Only if you have some reason to then think that the vIEw is too simple or you need to drill down into the commit relationships should you use it.

总结

以上是内存溢出为你收集整理的linux – git:gitk有“按日期排序”的命令行选项吗?全部内容,希望文章能够帮你解决linux – git:gitk有“按日期排序”的命令行选项吗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1033139.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存