Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 3

Confusion over comparing tags across forks

Solved! Go to Solution.

I'd like to compare tags across forks in via the URL method but am unable to see diffs (clealy doing this incorrectly).  My goal is to see how archlinux/linux tag=v4.17.13-arch1 differs from linux/torvalds  tag=v4.17.13 (ie to see what the Arch devs are patching their version of the kernel with relative to the vanilla release).

 

I thought the following would do this but it does not give any diffs: https://github.com/archlinux/linux/compare/v4.17.13-arch1...torvalds:v4.17.13

 

I'm not sure how to fold in the stable tags to Linus' tree in the url... on the shell the following works:

 

git clone https://github.com/archlinux/linux.git
cd linux
git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git fetch --tags stable
git log v4.17.13..v4.17.13-arch1

 

2 Replies
Highlighted
Moderator
Message 2 of 3

Re: Confusion over comparing tags across forks

Hi @graysky2,

 

Thanks so much for being part of the GitHub Community Forum. I'll do all I can to help.

 

First, it looks like you are trying to compare using a tag that doesn't actually exist. `torvalds` actually doesn't appear to have a `v4.17.13` tag, but only a `v4.17` tag. Fixing that reference should help.

 

Additionally, you'll want to switch the order of the URL for better results. Instead of setting up the URL so that you're querying `archlinux:v4.17.13-arch1` --> `torvalds:v4.17`, you'll want to do this:

https://github.com/torvalds/linux/compare/v4.17...archlinux:v4.17.13-arch1

That should yield better results for you.

I hope this helps! Let me know if you have further questions.

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Highlighted
Solution
Copilot Lvl 3
Message 3 of 3

Re: Confusion over comparing tags across forks

@nadiajoyce - Thank you for the thoughtful reply.  I acutally parallel posted here and on the Arch linux forums.  A user there (progandy) suggested the following which seems to work very well.

tag=v4.17.13
archtag=v4.17.13-arch1
tagged="$(curl "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tag/?h=$tag" | sed -n 's#.*/linux.git.commit.*id=\(\w*\).*#\1#p')"
xdg-open "https://github.com/archlinux/linux/compare/$tagged...$archtag"