为什么不git版本目录? [英] Why doesn't git version directories?

查看:149
本文介绍了为什么不git版本目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很清楚,git不适用于空目录(这里比较受欢迎的git问题之一),但我问是否有一个特殊的理由或理由(如果可能,官方)不跟踪目录。

我在问,因为在某些情况下,目录可以有自己有意义的元数据。例如,如果正在使用粘滞模式,则目录的文件模式可能很重要。目录为空的事实对于应用程序可能很重要。

解决方案

没有官方的理由。 Git常见问题仅表明:


没有人有足够的能力进行更改以允许空目录
已经充分关注这种情况来补救它。



I'm well aware that git doesn't work on empty directories (one of the more popular git questions here), but I'm asking if there's a particular justification or rationale (official if possible) in not tracking directories.

I'm asking because directories, in some cases, can have meaningful metadata by themselves. For example, the file mode of a directory can be important if sticky modes are being used. The mere fact that a directory is empty may be important for an application.

解决方案

There is no official rationale. The Git FAQ simply states:

nobody competent enough to make the change to allow empty directories has cared enough about this situation to remedy it

这篇关于为什么不git版本目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆