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

Re: git on afs

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Oct 18, 2007, 21:57 UTC
Message-ID
<Pine.LNX.4.64.0710181645580.30020@torch.nrlssc.navy.mil>
In-Reply-To
<20071018203106.GA13518@fries.net>
On Thu, 18 Oct 2007, Todd T. Fries wrote:
Show 18 quoted lines
> 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             ^^^
Show 13 quoted lines
> +				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
Previous: Brandon CaseyNext: Linus Torvalds
Message 3 of 12 in “git on afs”
  1. Todd T. FriesOct 18, 2007
  2. Brandon CaseyOct 18, 2007
  3. Brandon CaseyOct 18, 2007
  4. Linus TorvaldsOct 18, 2007
  5. Shawn O. PearceOct 19, 2007
  6. Todd T. FriesOct 19, 2007
  7. Linus TorvaldsOct 19, 2007
  8. Linus TorvaldsOct 19, 2007
  9. Shawn O. PearceOct 19, 2007
  10. Todd T. FriesOct 19, 2007
  11. Daniel BarkalowOct 19, 2007
  12. Shawn O. PearceOct 20, 2007

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.