summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-traverse.c
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-071-3/+1
|
* lib/repo: Add ostree_repo_traverse_commit_union_with_parentsAlexander Larsson2018-04-141-14/+175
| | | | | | | | | | This is a version of ostree_repo_traverse_commit_union that also remembers where the objects came from, by recording the parent relationships in a hashtable. This can be used to later find which commits each object was from, which we want to use in fsck. Closes: #1533 Approved by: cgwalters
* Add SPDX-License-Identifier to source filesMarcus Folkesson2018-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDX License List is a list of (common) open source licenses that can be referred to by a “short identifier”. It has several advantages compared to the common "license header texts" usually found in source files. Some of the advantages: * It is precise; there is no ambiguity due to variations in license header text * It is language neutral * It is easy to machine process * It is concise * It is simple and can be used without much cost in interpreted environments like java Script, etc. * An SPDX license identifier is immutable. * It provides simple guidance for developers who want to make sure the license for their code is respected See http://spdx.org for further reading. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Closes: #1439 Approved by: cgwalters
* lib/traverse: Port to new styleColin Walters2017-11-131-58/+36
| | | | | | | | Not prep for anything, was just reading this code a bit while working on rpm-ostree jigdo. Closes: #1338 Approved by: jlebon
* tree-wide: Remove Emacs modelinesColin Walters2017-09-211-2/+1
| | | | | | | | | We added a `.dir-locals.el` in commit: 9a77017d87b74c5e2895cdd64ad098018929403f There's no need to have it per-file, with that people might think to add other editors, which is the wrong direction. Closes: #1206 Approved by: jlebon
* traverse: Use g_hash_table_addColin Walters2016-11-301-6/+3
| | | | | | | | | And "move semantics" via `g_steal_pointer()`. Just a minor code cleanup I noticed when I was hunting for a leak, which ended up being elsewhere. Closes: #598 Approved by: jlebon
* ostree-repo-traverse: Don't leak floating GVariantAlexander Larsson2016-11-281-4/+4
| | | | | | | | ostree_object_name_serialize returns a floating ref, so we need to sink it before putting in the hashtable. Closes: #595 Approved by: cgwalters
* ostree-repo-traverse: Remove an accidental print statementJasper St. Pierre2016-11-231-1/+1
| | | | | Closes: #594 Approved by: jlebon
* Fix pruning of partial commitsAlexander Larsson2016-10-241-10/+50
| | | | | | | | | | | | | | | | | | | | If we have a partial commit it is not an error for a dirmeta to be missing (in fact, that is likely), so instead of returning a not-found error from ostree_repo_traverse_commit() we ignore the error and continue. In particular, this means we don't stop early at the first missing dirmeta, which previously caused ostree_repo_prune() to thing the dirmetas after that to be unreached and thus purged. Also, we remove the special casing in ostree_repo_prune() to not report errors for commitpartial, because these should not be reported anymore. This fixes https://github.com/ostreedev/ostree/issues/541 Closes: #542 Approved by: cgwalters
* repo: Fix leak with ostree_repo_commit_traverse_iter_init_commit()Colin Walters2016-07-221-0/+1
| | | | | | | I noticed this using `OT_TEST_VALGRIND=1` on `test-basic.sh`. Closes: #385 Approved by: jlebon
* core: Use OSTREE_SHA256_STRING_LEN instead of 64Mathnerd3142016-06-221-2/+2
| | | | | Closes: #359 Approved by: cgwalters
* Build on older versions of glibAlexander Larsson2016-05-251-0/+1
| | | | | | | | | | Various places need to include libglnx.h for the autoptr backport fallbacks to be there before ostree-autocleanups.h is included. This fixes the build on centos7· Closes: #309 Approved by: giuseppe
* core: Add debug messages for traversingDan Nicholson2016-03-261-0/+5
| | | | | | | | | | | | | | If you have a repo where a needed object has been inadvertantly removed, all you'll get is a "No such metadata object" error with no clue about where it was referenced from. Add some debug messages to provide clues about which objects are being traversed and found. https://bugzilla.gnome.org/show_bug.cgi?id=764006 Closes: #224 Approved by: cgwalters
* traverse: Require variant when traversing dirtreeDan Nicholson2016-03-231-3/+2
| | | | | | | | | | The dirtree object is required for traversing, so don't use the load_variant_if_exists() function. This will return a G_IO_ERROR_NOT_FOUND to the caller rather than trying to ref a NULL variant in ostree_repo_commit_traverse_iter_init_dirtree() if the object is missing. https://bugzilla.gnome.org/show_bug.cgi?id=764091
* libglnx porting: gs_transfer_out_value -> g_steal_pointerColin Walters2016-03-181-1/+2
| | | | It's a bit more verbose but...eh.
* Remove unnecessary #include "libgsystem.h"Matthew Barnes2015-05-061-1/+0
|
* Use g_autoptr(GVariant) instead of gs_unref_variantMatthew Barnes2015-05-061-10/+10
|
* Use g_autoptr(GHashTable) instead of gs_unref_hashtableMatthew Barnes2015-05-061-1/+1
|
* Use g_autofree instead of gs_freeMatthew Barnes2015-05-061-1/+1
|
* ostree-repo-traverse.c: Fix documentation parameter nameGiuseppe Scrivano2015-02-231-1/+1
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* repo: Add a new iterator traversal API for commitsColin Walters2015-02-161-95/+346
| | | | | This is a more optimized version of the GFile * APIs, and is now used internally by the previous ostree_repo_traverse().
* traverse: Fix transfer on hash tableColin Walters2015-01-211-2/+2
| | | | Otherwise, bindings try to erroneously unref the key/values as well.
* [staticanalysis]: Fix two uses of uninitialized variablesColin Walters2014-06-211-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=732020
* repo: Tweak traversal APIColin Walters2013-10-091-23/+52
| | | | | It's convenient for bindings if we have a version that doesn't mutate the hash table, because they pass temporary hash tables as input.
* Fix warnings about unused variablesTobias Hunger2013-08-301-1/+0
|
* Add ostree_commit_get_parent() to get parent from variantStef Walter2013-08-151-6/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=705973
* core: Fix all introspection warningsColin Walters2013-07-271-0/+8
| | | | Still lots more docs to write and API to cleanup, but this is better.
* Install a shared libraryColin Walters2013-07-261-0/+1
| | | | | This required a fair bit of surgery because previously ostree.h included otutil.h, but that's supposed to be a private library.
* Use AC_USE_SYSTEM_EXTENSIONS instead of #define _GNU_SOURCEColin Walters2013-07-101-2/+0
| | | | | | It's less copy/paste, works everywhere, etc. Also fix some missing #include "config.h".
* libostree: Rename ostree-traverse.h into OstreeRepo namespaceColin Walters2013-07-091-0/+227
This operates on the repo, it might as well be methods on it.