Re: [RFC 0/6] git-check-attr should work for relative paths

Subsystems: the rest

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [RFC 0/6] git-check-attr should work for relative paths

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:43

A minor compilation fix-up on top, to be squashed when the series is
re-rolled.
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index 23a6e07..8155b3d 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -44,7 +44,7 @@ static void output_attr(int cnt, struct git_attr_value *check,
 static void check_attr(const char *prefix, int cnt,
 	struct git_attr_value *check, const char *file)
 {
-	const char *full_path =
+	char *full_path =
 		prefix_path(prefix, prefix ? strlen(prefix) : 0, file);
 	if (check != NULL) {
 		if (git_checkattr(full_path, cnt, check))
diff --git a/test-path-utils.c b/test-path-utils.c
index 471406c..3bc20e9 100644
--- a/test-path-utils.c
+++ b/test-path-utils.c
@@ -36,10 +36,10 @@ int main(int argc, char **argv)
 	}
 
 	if (argc >= 4 && !strcmp(argv[1], "prefix_path")) {
-		int nongit_ok;
-		setup_git_directory_gently(&nongit_ok);
 		char *prefix = argv[2];
 		int prefix_len = strlen(prefix);
+		int nongit_ok;
+		setup_git_directory_gently(&nongit_ok);
 		while (argc > 3) {
 			puts(prefix_path(prefix, prefix_len, argv[3]));
 			argc--;

Re: [RFC 0/6] git-check-attr should work for relative paths

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:51:44

On 08/03/2011 12:02 AM, Junio C Hamano wrote:
A minor compilation fix-up on top, to be squashed when the series is
re-rolled. [...]
Thanks for catching this.  I will include it in the re-roll.  (The patch
series needs to be re-rolled anyway, since it depends on
mh/check-attr-listing, which is being improved based on your feedback.)

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help