After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776556 - flatpak: do not handle branches of the git source field correctly
flatpak: do not handle branches of the git source field correctly
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: plugins
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-28 22:30 UTC by Simon Schampijer
Modified: 2016-12-30 01:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flatpak: make sure to correctly parse revisions (2.50 KB, patch)
2016-12-28 22:30 UTC, Simon Schampijer
none Details | Review

Description Simon Schampijer 2016-12-28 22:30:15 UTC
Created attachment 342557 [details] [review]
flatpak: make sure to correctly parse revisions

The branch field for git sources does support several types: "The branch/tag/commit to use from the git repository" (http://flatpak.org/flatpak/flatpak-docs.html#flatpak-builder). 

In the flatpak plugin we do use the branch specified in the manifest directly to set as a branch "ggit_clone_options_set_checkout_branch (clone_options, req->src->branch);" and that fails with "reference not found".

The patch uses ggit_repository_revparse to identify the given branch field and does a hard reset to that revision.
Comment 1 Matthew Leeds 2016-12-30 01:32:24 UTC
Pushed as commit 59414846dda1e0a51ff1144fd508bea402448cc9