English 中文(简体)
gitlab compare - get raw patch / diff file
原标题:
  • 时间:2023-06-10 02:32:08
  •  标签:
  • gitlab

My situation

In both github and gitlab, I can compare two branches or refs in the UI:

  • github: https://github.com/*/*/compare/1.x...2.x
  • gitlab: https://*.*.*/*/*/-/compare/1.x...2.x

In github, I can append .diff or .patch to this comparison, to get a raw diff or patch file.

In gitlab, this does not work.

In gitlab, I can append .patch or .diff to a single commit url like ***/-/commit/***.diff, or to a merge request url like ***/-/merge_requests/16.patch`. But it does not work on compare urls.

Why do I need this?

I like to use these patch urls in package managers like composer, so I don t have to manually create the patch file and save it somewhere.

And sometimes I don t want to apply a single commit or a complete PR/MR, but a very specific range of commits.

Question

How can I get the raw diff or patch file for a comparison in gitlab?

Version of gitlab

The instance of gitlab I tried this with is https://git.drupalcode.org/. In the help it says the version is 15.11.7-ee.

I think I had the same experience with other gitlab instances.

问题回答

暂无回答




相关问题
Gitlab CI: conditionally ignore needs based on rules?

So I have a pipeline that builds docker images to be used later by other parts of the pipeline. I have set things up so this image-building part of the pipeline only triggers if special tags are ...

Google Colab x Gitlab Repository cloning problem

I am trying to clone my repository in Gitlab to Google Colab but kept receiving this below error. Google Colab has no issue with Github project cloning but Gitlab doesn t seem work. Cloning into <...

gitlab compare - get raw patch / diff file

My situation In both github and gitlab, I can compare two branches or refs in the UI: github: https://github.com/*/*/compare/1.x...2.x gitlab: https://*.*.*/*/*/-/compare/1.x...2.x In github, I can ...

Gitlab CI On Prem, Docker Image and ASP.NET Core 7

We have a .NET 6 application. We added CI using: image: mcr.microsoft.com/dotnet/sdk:6.0 before_script: - dotnet restore --packages $NUGET_PACKAGES_DIRECTORY build: stage: build script: - ...

4. 吉拉布-西姆勒,以创造合并后

我在DEV分行有以下电离板-ci.yml文档,其目标也是平等与发展。 由于将TARGET作为MASTER,没有自动产生MR。 我要知道......

How to find a deleted file in the project commit history?

Once upon a time, there was a file in my project that I would now like to be able to get. The problem is: I have no idea of when have I deleted it and on which path it was. How can I locate the ...

热门标签