Including Upstream Branch information in Fedora Packages

This is a spin-off topic from How can we include Upstream URLs in Fedora Packages? addressing specifically the branch information piece.

This is a usecase that i learned about in my conversations with @prarit as it relates to hummingbird packages (hummingbird has defined their own JSON sidecar metadata and is reliably populating upstream url and branch (where needed)

One suggestion in the original thread was

I suspect this is where this PR came from: Add optional branch information to VCS tag by prarit · Pull Request #4235 · rpm-software-management/rpm · GitHub

Id personally like to understand the usecase for branch information more (it isnt the most needed for my own usecase).

Im also curious how some existing concerns play out, such as:

Hope this separate thread helps break out that specific discussion

from @prarit in the PR:

I simply want to know where to look/go-to as a developer to report a bug/push a fix. That’s it. That information is hugely beneficial to me as a developer. Having that data in RPMs isn’t necessarily useful to the build but it is useful to me as a human who wants to do the right thing by reporting or fixing a bug.

Seems like the branch name is useful for developers looking for which branch to base their patches on. I can see this having value as an informational field and needing to be a separate field since branch names may not always match the version tag thats used for the actual build

If by “branch” you mean the git term, then it is mostly useless information. A git branch is a reference which can (and mostly is) rewritten at any time. And without a record of what a branch pointed to at a given point in time (the reflog), this is not verifiable information - just some description of where the packager got things from back then.
Reliable info would be: a commit hash of the commit from which the source tree was taken (or tree hash or tag object hash).