mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 14:48:23 +00:00
Checkout: reindent, fix uninit. variable.
This commit is contained in:
parent
0e874b12d8
commit
4a26ee4fd4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user