ostree-repo-pull: always initialize flags_i
Otherwise we get undefined behaviour if the client didn't explicitly set any flags. Also, add documentation for all the other options supported by ostree_repo_pull_with_options(). Closes: #252 Approved by: cgwalters
This commit is contained in:
parent
e62beae695
commit
b69fd11487
|
|
@ -1908,7 +1908,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
|
|
||||||
if (options)
|
if (options)
|
||||||
{
|
{
|
||||||
int flags_i;
|
int flags_i = OSTREE_REPO_PULL_FLAGS_NONE;
|
||||||
(void) g_variant_lookup (options, "refs", "^a&s", &refs_to_fetch);
|
(void) g_variant_lookup (options, "refs", "^a&s", &refs_to_fetch);
|
||||||
(void) g_variant_lookup (options, "flags", "i", &flags_i);
|
(void) g_variant_lookup (options, "flags", "i", &flags_i);
|
||||||
/* Reduce risk of issues if enum happens to be 64 bit for some reason */
|
/* Reduce risk of issues if enum happens to be 64 bit for some reason */
|
||||||
|
|
|
||||||
|
|
@ -3999,11 +3999,17 @@ ostree_repo_pull_one_dir (OstreeRepo *self,
|
||||||
* Like ostree_repo_pull(), but supports an extensible set of flags.
|
* Like ostree_repo_pull(), but supports an extensible set of flags.
|
||||||
* The following are currently defined:
|
* The following are currently defined:
|
||||||
*
|
*
|
||||||
* * subdir (s): Pull just this subdirectory
|
* * refs (as): Array of string refs
|
||||||
* * flags (i): An instance of #OstreeRepoPullFlags
|
* * flags (i): An instance of #OstreeRepoPullFlags
|
||||||
* * refs: (as): Array of string refs
|
* * subdir (s): Pull just this subdirectory
|
||||||
* * depth: (i): How far in the history to traverse; default is 0, -1 means infinite
|
* * override-remote-name (s): If local, add this remote to refspec
|
||||||
* * override-commit-ids: (as): Array of specific commit IDs to fetch for refs
|
* * gpg-verify (b): GPG verify commits
|
||||||
|
* * gpg-verify-summary (b): GPG verify summary
|
||||||
|
* * depth (i): How far in the history to traverse; default is 0, -1 means infinite
|
||||||
|
* * disable-static-deltas (b): Do not use static deltas
|
||||||
|
* * require-static-deltas (b): Require static deltas
|
||||||
|
* * override-commit-ids (as): Array of specific commit IDs to fetch for refs
|
||||||
|
* * dry-run (b): Only print information on what will be downloaded (requires static deltas)
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
ostree_repo_pull_with_options (OstreeRepo *self,
|
ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue