git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v1 1/3] dir.c: coding style fix

From
Karsten Blees <karsten.blees@gmail.com>
Date
Jul 14, 2014, 09:47 UTC
Message-ID
<53C3A71F.1020101@gmail.com>
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?=
 <pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
---
 dir.c | 12 ++++++------
 1 file 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");
-- 
2.0.0.9646.g840d1f9.dirty
Next: Karsten Blees
Message 1 of 6 in “dir.c: coding style fix”
  1. 1/3 dir.c: coding style fixKarsten Blees, Jul 14, 2014
  2. 2/3 dir.h: move struct exclude declaration to top levelKarsten Blees, Jul 14, 2014
  3. 3/3 prep_exclude: remove the artificial PATH_MAX limitKarsten Blees, Jul 14, 2014
  4. Junio C HamanoJul 14, 2014
  5. Karsten BleesJul 15, 2014
  6. Junio C HamanoJul 15, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.