Gitlab Branch/Tag 从低版本到更新版本的比较
Gitlab Branch/Tag comparision from Lower Version to updated version
我创建了两个标签,并通过将标签 1 保持为 Source
并将标签 2 保持为 Target
来比较它们,然后输出结果为 没有任何东西可以比较。
您需要使用不同的分支名称才能进行有效比较。
如果我互换标签,即 Tag2 为 Source
,Tag1 为 Target
,则 diff
会正确显示。为什么更新版本在 Target
时不显示 diff
这已在 gitlab-ce issue 37889 中看到,但这可能不是错误。
The per-project compare page allows the input of two SHA1, but clicking on the compare button returns this message:
There isn't anything to compare.
You'll need to use different branch names to get a valid comparison.
However, comparing from an old commit on master to master
itself gives the expected result (all the commits from the old commit to the HEAD of master
are shown), so it seems that the functionality is there.
最新的 10.x GitLab 版本仍然可见。
issue 25162 的评论说明了这个问题:
Comparing e1bf40e2 to 3d0074a6 works as expected. However, reverse the order and "There isn't anything to compare.".
This one is okay:
e1bf40e2...3d0074a6
This one is not okay:
3d0074a6...e1bf40e2
但是:
I'm not sure if this is a bug, but I also don't know what the intent for the compare tool in GitLab is suppose to do.
I assume GitLab is diffing 2 commits with 3 dots. The 3 dots will tell Git to use the common ancestor for diffing.
The issue is 3d0074a6...e1bf40e2
would be the same as executing git diff $common-ancestor e1bf40e2
where $common-ancestor
is the result of executing git merge-base 3d0074a6 e1bf40e2
which is e1bf40e2
So what's happening is, you are executing git diff e1bf40e2 e1bf40e2
which is why there is no difference.
I'm guessing you want to execute git diff 3d0074a6 e1bf40e2
without the dots, which will tell Git to diff the commits and not the common ancestor.
因此请检查您的 diff URL:如果您看到三个点,则表明错误消息正常。
我创建了两个标签,并通过将标签 1 保持为 Source
并将标签 2 保持为 Target
来比较它们,然后输出结果为 没有任何东西可以比较。
您需要使用不同的分支名称才能进行有效比较。
如果我互换标签,即 Tag2 为 Source
,Tag1 为 Target
,则 diff
会正确显示。为什么更新版本在 Target
diff
这已在 gitlab-ce issue 37889 中看到,但这可能不是错误。
The per-project compare page allows the input of two SHA1, but clicking on the compare button returns this message:
There isn't anything to compare.
You'll need to use different branch names to get a valid comparison.
However, comparing from an old commit on master to
master
itself gives the expected result (all the commits from the old commit to the HEAD ofmaster
are shown), so it seems that the functionality is there.
最新的 10.x GitLab 版本仍然可见。
issue 25162 的评论说明了这个问题:
Comparing e1bf40e2 to 3d0074a6 works as expected. However, reverse the order and "There isn't anything to compare.".
This one is okay:
e1bf40e2...3d0074a6This one is not okay:
3d0074a6...e1bf40e2
但是:
I'm not sure if this is a bug, but I also don't know what the intent for the compare tool in GitLab is suppose to do.
I assume GitLab is diffing 2 commits with 3 dots. The 3 dots will tell Git to use the common ancestor for diffing.
The issue is
3d0074a6...e1bf40e2
would be the same as executinggit diff $common-ancestor e1bf40e2
where$common-ancestor
is the result of executinggit merge-base 3d0074a6 e1bf40e2
which ise1bf40e2
So what's happening is, you are executing
git diff e1bf40e2 e1bf40e2
which is why there is no difference.I'm guessing you want to execute
git diff 3d0074a6 e1bf40e2
without the dots, which will tell Git to diff the commits and not the common ancestor.
因此请检查您的 diff URL:如果您看到三个点,则表明错误消息正常。