Commit 4a26ee4f by Ben Straub

Checkout: reindent, fix uninit. variable.

parent 0e874b12
......@@ -53,6 +53,7 @@ typedef struct tree_walk_data
} tree_walk_data;
/* TODO: murder this */
static int count_walker(const char *path, git_tree_entry *entry, void *payload)
{
GIT_UNUSED(path);
......@@ -76,7 +77,7 @@ static int apply_filters(git_buf *out,
return 0;
}
git_buf origblob;
git_buf origblob = GIT_BUF_INIT;
git_buf_attach(&origblob, (char*)data, len);
retcode = git_filters_apply(out, &origblob, filters);
git_buf_detach(&origblob);
......@@ -99,7 +100,6 @@ static int blob_contents_to_file(git_repository *repo, git_buf *fnbuf, const git
filter_count = git_filters_load(&filters, repo,
git_buf_cstr(fnbuf),
GIT_FILTER_TO_WORKTREE);
printf("Got %d filters\n", filter_count);
if (filter_count >= 0) {
git_buf filteredblob = GIT_BUF_INIT;
if (!apply_filters(&filteredblob, &filters, contents, len)) {
......@@ -110,6 +110,7 @@ static int blob_contents_to_file(git_repository *repo, git_buf *fnbuf, const git
p_close(fd);
}
}
git_buf_free(&filteredblob);
}
git_blob_free(blob);
......@@ -150,9 +151,7 @@ static int checkout_walker(const char *path, git_tree_entry *entry, void *payloa
return retcode;
}
/* TODO
* -> Line endings
*/
int git_checkout_force(git_repository *repo, git_indexer_stats *stats)
{
int retcode = GIT_ERROR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment