Re: [PATCH] fsck: warn about ".git" in trees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Having a ".git" entry inside a tree can cause confusing
results on checkout. At the top-level, you could not
checkout such a tree, as it would complain about overwriting
the real ".git" directory. In a subdirectory, you might
check it out, but performing operations in the subdirectory
would confusingly consider the in-tree ".git" directory as
the repository.
[snip]
+	int has_dotgit = 0;

Name like "." or ".." are handled as directories by the OS.

".git" could be a file or a directory, at least in theory,
and from the OS point of view,
but we want to have this as a reserved name.

Looking at bad directory names, which gives trouble when checking out:

Should we check for "/" or "../blabla" as well?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]