summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-07-14 09:47:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-14 22:24:34 (GMT)
commitd961baa84689afdd0fe6b81f68b06481d83ce249 (patch)
tree19beddce03191159c727dd5b6eb253516763221d /dir.c
parent66f467c3e6aa9c1e28eaf7b71cea5e452fc104e8 (diff)
downloadgit-d961baa84689afdd0fe6b81f68b06481d83ce249.zip
git-d961baa84689afdd0fe6b81f68b06481d83ce249.tar.gz
git-d961baa84689afdd0fe6b81f68b06481d83ce249.tar.bz2
dir.c: coding style fix
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dir.c b/dir.c
index e65888d..3068ca8 100644
--- a/dir.c
+++ b/dir.c
@@ -557,8 +557,7 @@ int add_excludes_from_file_to_list(const char *fname,
buf = xrealloc(buf, size+1);
buf[size++] = '\n';
}
- }
- else {
+ } else {
size = xsize_t(st.st_size);
if (size == 0) {
close(fd);
@@ -793,9 +792,11 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)
group = &dir->exclude_list_group[EXC_DIRS];
- /* Pop the exclude lists from the EXCL_DIRS exclude_list_group
+ /*
+ * Pop the exclude lists from the EXCL_DIRS exclude_list_group
* which originate from directories not in the prefix of the
- * path being checked. */
+ * path being checked.
+ */
while ((stk = dir->exclude_stack) != NULL) {
if (stk->baselen <= baselen &&
!strncmp(dir->basebuf, base, stk->baselen))
@@ -822,8 +823,7 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)
if (current < 0) {
cp = base;
current = 0;
- }
- else {
+ } else {
cp = strchr(base + current + 1, '/');
if (!cp)
die("oops in prep_exclude");