git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brandon Casey <casey@nrlssc.navy.mil>
To: "Todd T. Fries" <todd@fries.net>
Cc: git@vger.kernel.org
Subject: Re: git on afs
Date: Thu, 18 Oct 2007 16:57:32 -0500 (CDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710181645580.30020@torch.nrlssc.navy.mil> (raw)
In-Reply-To: <20071018203106.GA13518@fries.net>

On Thu, 18 Oct 2007, Todd T. Fries wrote:

> 2) git presumes that DTYPE(de) != DT_DIR .. means the dirent is not a dir
>   this is not true for afs
>
> I have been using this to sync several git trees, including linux-2.6 for the
> past week without issues writing to a local afs server.
>
> What do you guys think?
>
> diff --git a/dir.c b/dir.c
> index eb6c3ab..a3e53a5 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -487,9 +487,19 @@ static int read_directory_recursive(struct dir_struct *dir, const char *path, co
> 			    && in_pathspec(fullname, baselen + len, simplify))
> 				dir_add_ignored(dir, fullname, baselen + len);
> 			if (exclude != dir->show_ignored) {
> -				if (!dir->show_ignored || DTYPE(de) != DT_DIR) {
> +				if (!dir->show_ignored)

you're missing an open bracket                          ^^^

> 					continue;
> 				}

or delete this one             ^^^

> +				if (DTYPE(de) == DT_UNKNOWN) {
> +					struct stat st;
> +					if (lstat(fullname, &st))
> +						continue;
> +					if (!S_ISDIR(st.st_mode))
> +						continue;
> +				} else {
> +					if (DTYPE(de) != DT_DIR)
> +						continue;
> +				}
> 			}
>
> 			switch (DTYPE(de)) {

seems sane to me.

If no one else brings up any issues, you should retest and submit
a signed patch with a good comment. Use -s with git-commit.
Then git-format-patch will produce the proper output.

-brandon

  parent reply	other threads:[~2007-10-18 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 20:31 git on afs Todd T. Fries
2007-10-18 21:28 ` Brandon Casey
2007-10-18 21:57 ` Brandon Casey [this message]
2007-10-18 22:47 ` Linus Torvalds
2007-10-19  6:06   ` Shawn O. Pearce
2007-10-19 12:19     ` Todd T. Fries
2007-10-19 17:59       ` Linus Torvalds
2007-10-19 19:06     ` Linus Torvalds
2007-10-19  5:48 ` Shawn O. Pearce
2007-10-19 12:42   ` Todd T. Fries
2007-10-19 20:19     ` Daniel Barkalow
2007-10-20  5:29     ` Shawn O. Pearce

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=Pine.LNX.4.64.0710181645580.30020@torch.nrlssc.navy.mil \
    --to=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=todd@fries.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).