[PATCH] allow git-update-index work on subprojects

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Git Mailing List <git@...>, Junio C Hamano <junkio@...>
Date: Tuesday, April 10, 2007 - 9:39 am

On 4/10/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:

At least git-update-index should work.

---
 builtin-update-index.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/builtin-update-index.c b/builtin-update-index.c
index 47d42ed..55c9f93 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -94,12 +94,10 @@ static int process_file(const char *path)
 				             path);
 			}
 		}
-		if (0 == status)
-			return error("%s: is a directory - add files inside instead",
-			             path);
-		else
+		if (status)
 			return error("lstat(\"%s\"): %s", path,
 				     strerror(errno));
+		/* could be a subproject */
 	}

 	namelen = strlen(path);
@@ -211,7 +209,7 @@ static void update_one(const char *path, const
char *prefix, int prefix_length)
 		goto free_return;
 	}
 	if (process_file(p))
-		die("Unable to process file %s", path);
+		die("Unable to process \"%s\"", path);
 	report("add '%s'", path);
  free_return:
 	if (p < path || p > path + strlen(path))
-- 
1.5.1.147.gbaa5
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] allow git-update-index work on subprojects, Alex Riesen, (Tue Apr 10, 9:39 am)
[PATCH] Allow git-update-index work on subprojects, Alex Riesen, (Tue Apr 10, 7:19 pm)
Re: [PATCH] Allow git-update-index work on subprojects, Junio C Hamano, (Tue Apr 10, 10:55 pm)