All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: git@vger.kernel.org
Subject: Re: [RFC 0/6] git-check-attr should work for relative paths
Date: Tue, 02 Aug 2011 15:02:01 -0700	[thread overview]
Message-ID: <7vwrevcw12.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1311849425-9057-1-git-send-email-mhagger@alum.mit.edu> (Michael Haggerty's message of "Thu, 28 Jul 2011 12:36:59 +0200")

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--;

  parent reply	other threads:[~2011-08-02 22:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 10:36 [RFC 0/6] git-check-attr should work for relative paths Michael Haggerty
2011-07-28 10:37 ` [RFC 1/6] git-check-attr: test that no output is written to stderr Michael Haggerty
2011-07-28 10:37 ` [RFC 2/6] git-check-attr: Demonstrate problems with unnormalized paths Michael Haggerty
2011-07-28 10:37 ` [RFC 3/6] git-check-attr: Demonstrate problems with relative paths Michael Haggerty
2011-07-28 10:37 ` [RFC 4/6] git-check-attr: Normalize paths Michael Haggerty
2011-08-02 17:24   ` Junio C Hamano
2011-08-04  3:32     ` Michael Haggerty
2011-08-04 17:05       ` Junio C Hamano
2011-08-05  6:24         ` Michael Haggerty
2011-08-05 15:02           ` Junio C Hamano
2011-08-07  4:32             ` Michael Haggerty
2011-07-28 10:37 ` [RFC 5/6] test-path-utils: Add subcommand "absolute_path" Michael Haggerty
2011-07-28 10:37 ` [RFC 6/6] test-path-utils: Add subcommand "prefix_path" Michael Haggerty
2011-08-02 22:02 ` Junio C Hamano [this message]
2011-08-04  3:35   ` [RFC 0/6] git-check-attr should work for relative paths Michael Haggerty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vwrevcw12.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.