summaryrefslogtreecommitdiff
path: root/builtin/update-index.c
diff options
context:
space:
mode:
authorLibravatar Christian Couder <christian.couder@gmail.com>2016-01-24 16:28:18 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-01-25 12:39:46 -0800
commite7c0c5354be01bedb4c6f0ad3b095ff0bfefa272 (patch)
treec706256efc332b3b5748648a24ff184b3d662b7d /builtin/update-index.c
parentupdate-index: add untracked cache notifications (diff)
downloadtgif-e7c0c5354be01bedb4c6f0ad3b095ff0bfefa272.tar.xz
update-index: move 'uc' var declaration
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r--builtin/update-index.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 369c207312..fe7aaa34a4 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -1116,8 +1116,6 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
the_index.cache_changed |= SOMETHING_CHANGED;
}
if (untracked_cache > UC_DISABLE) {
- struct untracked_cache *uc;
-
if (untracked_cache < UC_FORCE) {
setup_work_tree();
if (!test_if_untracked_cache_is_supported())
@@ -1126,7 +1124,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
return 0;
}
if (!the_index.untracked) {
- uc = xcalloc(1, sizeof(*uc));
+ struct untracked_cache *uc = xcalloc(1, sizeof(*uc));
strbuf_init(&uc->ident, 100);
uc->exclude_per_dir = ".gitignore";
/* should be the same flags used by git-status */