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 731984 - libostree: Add ostree_repo_remote_add() API, port "ostree remote add"
libostree: Add ostree_repo_remote_add() API, port "ostree remote add"
Status: RESOLVED FIXED
Product: ostree
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: OSTree maintainer(s)
OSTree maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-06-20 19:05 UTC by Colin Walters
Modified: 2014-06-21 19:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libostree: Add ostree_repo_remote_add() API, port "ostree remote add" (11.83 KB, patch)
2014-06-20 19:05 UTC, Colin Walters
committed Details | Review
remote: Fix regression in previous commit wrt adding branches (930 bytes, patch)
2014-06-21 16:11 UTC, Colin Walters
committed Details | Review
remote: Minor argument parsing cleanup (1.14 KB, patch)
2014-06-21 16:12 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2014-06-20 19:05:27 UTC
At least one external tool is using the API, and wants to add a
remote, but all of the logic right now is in the tool.  Move it to the
library.
Comment 1 Colin Walters 2014-06-20 19:05:29 UTC
Created attachment 278862 [details] [review]
libostree: Add ostree_repo_remote_add() API, port "ostree remote add"
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-06-20 19:10:41 UTC
Review of attachment 278862 [details] [review]:

Looks good. I meant to do this a while ago. Maybe a bit weird if you can't also remove remotes, but whatever.
Comment 3 Colin Walters 2014-06-20 19:37:05 UTC
Attachment 278862 [details] pushed as 2265ccd - libostree: Add ostree_repo_remote_add() API, port "ostree remote add"
Comment 5 Colin Walters 2014-06-21 16:11:25 UTC
Created attachment 278896 [details] [review]
remote: Fix regression in previous commit wrt adding branches

branches is always NULL at that point, we want to look at argc.
Comment 6 Colin Walters 2014-06-21 16:12:37 UTC
Created attachment 278897 [details] [review]
remote: Minor argument parsing cleanup

Only access relevant portion of argv after we've verified argc.
Comment 7 Jasper St. Pierre (not reading bugmail) 2014-06-21 16:53:04 UTC
Review of attachment 278897 [details] [review]:

OK.
Comment 8 Jasper St. Pierre (not reading bugmail) 2014-06-21 16:54:16 UTC
Review of attachment 278896 [details] [review]:

You should probably remove the "branches" local as well -- it's unused.
Comment 9 Colin Walters 2014-06-21 19:58:13 UTC
Removed unused variable too, thanks!

Attachment 278896 [details] pushed as 1962623 - remote: Fix regression in previous commit wrt adding branches
Attachment 278897 [details] pushed as 6eac108 - remote: Minor argument parsing cleanup