Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'walker.c')
-rw-r--r--walker.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/walker.c b/walker.c
index dffb9c8e37..86359ab0ab 100644
--- a/walker.c
+++ b/walker.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "walker.h"
+#include "object-store.h"
#include "commit.h"
#include "tree.h"
#include "tree-walk.h"
@@ -72,6 +73,8 @@ static struct commit_list *complete = NULL;
static int process_commit(struct walker *walker, struct commit *commit)
{
+ struct commit_list *parents;
+
if (parse_commit(commit))
return -1;
@@ -86,19 +89,14 @@ static int process_commit(struct walker *walker, struct commit *commit)
walker_say(walker, "walk %s\n", oid_to_hex(&commit->object.oid));
- if (walker->get_tree) {
- if (process(walker, &commit->tree->object))
+ if (process(walker, &get_commit_tree(commit)->object))
+ return -1;
+
+ for (parents = commit->parents; parents; parents = parents->next) {
+ if (process(walker, &parents->item->object))
return -1;
- if (!walker->get_all)
- walker->get_tree = 0;
- }
- if (walker->get_history) {
- struct commit_list *parents = commit->parents;
- for (; parents; parents = parents->next) {
- if (process(walker, &parents->item->object))
- return -1;
- }
}
+
return 0;
}