diff options
author | Jiri Pospisil <mekishizufu@gmail.com> | 2014-03-05 20:26:13 +0100 |
---|---|---|
committer | Jiri Pospisil <mekishizufu@gmail.com> | 2014-03-05 20:31:15 +0100 |
commit | feebe6150f33b9713505c76ff2f204997b9d8687 (patch) | |
tree | 24030bf4a532e1eef9a7126b924cfe0b63b5fdc4 /examples | |
parent | a53b858417a8781d8e018a51ec66495964c54e1b (diff) | |
download | libgit2-feebe6150f33b9713505c76ff2f204997b9d8687.tar.gz |
Move all variable declarations to the top of the block
Diffstat (limited to 'examples')
-rw-r--r-- | examples/tag.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/tag.c b/examples/tag.c index 2d5a3d225..4c689cc55 100644 --- a/examples/tag.c +++ b/examples/tag.c @@ -293,18 +293,21 @@ static void tag_options_init(tag_options *opts) int main(int argc, char **argv) { + git_repository *repo; + tag_options opts; + tag_action action; + tag_state state; + git_threads_init(); - git_repository *repo; check_lg2(git_repository_open_ext(&repo, ".", 0, NULL), "Could not open repository", NULL); - tag_options opts; tag_options_init(&opts); - tag_action action; parse_options(&action, &opts, argc, argv); - tag_state state = {repo, &opts}; + state.repo = repo; + state.opts = &opts; action(&state); git_repository_free(repo); |