Skip to content

Raw diff between tags and branches #13416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pfactum opened this issue Nov 3, 2020 · 4 comments
Open

Raw diff between tags and branches #13416

pfactum opened this issue Nov 3, 2020 · 4 comments
Labels
type/enhancement An improvement of existing functionality

Comments

@pfactum
Copy link

pfactum commented Nov 3, 2020

Currently, it is possible to get a raw diff between 2 commits, for instance:

https://try.gitea.io/Etzelia/review/commit/4be8c56ae08e83c486854d9221cbd16e84607ca8...2eaa86164eb4cca84e14be1c357398c7b2c4efa2.diff

The same doesn't work, however, if tags are used instead of commit IDs, and branch names does not seem to work either. For instance:

https://try.gitea.io/ikervagyok/reflex-platform/commit/v0.5.3.0...v0.6.0.0.diff

It would be nice to have some unified URL to get a plain diff between any tags, commits and branch HEADs mix.

An example of how this works with github:

https://github.com/pfactum/pf-kernel/compare/v5.9...pf-5.9.diff

This gives a raw diff between a tag and a branch HEAD.

@pfactum
Copy link
Author

pfactum commented Jul 15, 2022

Copy-pasting reasoning from Codeberg Matrix room.


to put it in a context, this is a nice feature to use with huge projects like linux kernel where there's some base (say, v5.18 tag), and a small amount of commits on top of that tag. you wanna build the whole kernel, and you already have that base downloaded as a tarball from the kernel.org site, and what you need to download is that small diff on top of the tag without having to clone the whole repo

and this becomes especially useful if cloud-based build system (like opensuse build service) is used. once you rebuild the kernel, you upload just a tiny diff between two small diffs, not a 150 MiB tarball each time

@denyskon denyskon added the type/enhancement An improvement of existing functionality label Jul 3, 2023
@FWDekker
Copy link
Contributor

I don't know as of which version, but at least in v1.21.0 and newer you can go to <owner>/<repo>/compare/<ref1>..<ref2>, where either ref can be a commit hash, a branch, or release. For example, https://try.gitea.io/test/test/compare/67285b9af1f2c7efea09fc7563e0e182ffc77a3d..master

I think this issue can be closed.

@pfactum
Copy link
Author

pfactum commented Dec 14, 2023

@FWDekker I don't think this is solved. Yes, one can compare between two refs, but there's no way to generate a plain diff between those, which is the point of this RFE. Appending .diff to the URL you've mentioned generates error 404.

@FWDekker
Copy link
Contributor

Oops, you're right! I missed the "raw" part in your issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants