--oneline在git diff中是什么? [英] What does --oneline in git diff?

查看:116
本文介绍了--oneline在git diff中是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的这个答案中,我保留了一个我不知道的选项,即--oneline应用于git diff而不是git log.但是在man git-diff中搜索oneline不会产生任何结果.仍然git diff --oneline不会出错.

In this answer of mine, I have kept from the question an option I didn't know of, namely --oneline applied to git diff instead of git log. But searching for oneline in man git-diff doesn't give any reult. Still git diff --oneline doesn't error.

它是做什么用的?

推荐答案

根据 git-diff 文档,该命令显示提交,提交和工作树等之间的更改. git-log 文档中找到了一条评论:

According to git-diff documentation, the command shows the changes between commits, commit and working tree, etc. The git-diff-tree command is part of git-diff, it compares two tree objects. This makes it possible to use the option. It is a short form of --pretty=oneline --abbrev-commit. I also found a comment in the git-log documentation:

该命令具有适用于git rev-list命令的选项以控制显示内容和方式,以及适用于git diff- *命令的选项以控制如何显示每次提交引入的更改.

The command takes options applicable to the git rev-list command to control what is shown and how, and options applicable to the git diff-* commands to control how the changes each commit introduces are shown.

因此,我怀疑这是子命令的可能选项,但对git-diff命令没有影响.

So I suspect it is a possible option for a subcommand, but it has no effect on the git-diff command.

这篇关于--oneline在git diff中是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆