3

我为一个新项目创建了一个新的 git 存储库并添加了几个提交。我想请我的同事审查 Phabricator 中的整个项目。

是否有一个我可以发出的 Arcanist 命令将导致整个项目以及所有提交出现在 Phabricator 中以供审查?

我想做的基本上是这样的:

arc diff before-first-commit

第一个提交的 id 为“aabbcc”。这不起作用:

arc diff aabbcc~
Usage Exception: Unable to find any git commit named 'aabbcc~' in this repository.

相关问题

在 git 中,空提交“第一次提交之前的提交”是否有类似伪分支名称的东西?

是否有一个git diff命令可以输出项目中的所有文件?就像是:

git diff before-first-commit HEAD
4

2 回答 2

6

你可以尝试这样的事情:

$ git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD | arc diff --raw

你也可以这样做:

$ arc diff --base arc:empty

但是在https://secure.phabricator.com/D9898登陆之前,Git 中存在一个错误。

(该错误现已修复,用于arc upgrade升级。)

于 2014-07-11T16:53:07.527 回答
0

For your related question, I am pretty sure you are looking for git-whatchanged - this will show all diffs for all commits, you run it as:

git whatchanged

This command will show you all diffs in sequence, but if you want to see all the files contents, well - just look at the directory with cat:

find . -type f -exec cat {} \;

For your original question - you might want to try this:

arc diff `git rev-list --max-parents=0 HEAD`
于 2014-07-11T17:06:31.667 回答