当在标准输出上说'创建模式'时,'git commit'是什么意思? [英] What does 'git commit' mean when it says 'create mode ...' on stdout?
问题描述
编辑:
作为下面描述的版本控制元数据问题的提议的解决方案。我还没有测试2015-05-13。
原始问题:
code> create | delete mode ... git commit
输出(下面的例子)代表某种元数据控制。 (和/或,这些行通常表示什么?)这些似乎是类似unix的文件许可代码/表示,虽然我不确定 - 完全是映射,但更大的问题是:如果有什么用这些代码/设置/值git 做? git是否试图利用这些保存的代码以任何方式证明有助于解决元数据问题我的超级用户的问题[如何重用/扩展etckeeper的元数据引擎用于非/ etc文件系统的git控制,或使用所述功能本地扩展git ?]( https://superuser.com/questions/367729/how-to-reuse-extend - etckeepers-metadata-engine-for-git-control-of-non-etc-file)?我知道git不能控制所有的文件系统元数据。
$ b $ [Git显然已经控制了文件的可执行属性/ perm(显然是可移植的大多数操作系统)和一些其他的东西,如文件系统的链接。我正在寻求更多/所有元数据的更多Unix / Linux / BSD / DarwinMacOSX控制机制,即所有权限和用户/组所有权。 ACL和其他元数据控制可选。试图看看目前存储的东西是否可以解决这个问题。]
root @ node1 Dec 15 09:40:45〜/.../ sandbox-1#git status
#在分支主机上
#要提交的更改:
#(使用git reset HEAD< file> ...来取消)
#
#modified:README
#new file:dummy-file-will-be-removed
#deleted:ownerfile
#
root @ node1 Dec 15 09:40:45〜/.../ sandbox-1#git commit -mtesting git
[master c5b0201] testing git
2个文件改变了,1个插入(+),2个删除( - )
创建模式100644 dummy-file-will-be-removed
删除模式100644 ownerfile
root @ node1 Dec 15 09 :41:55〜/.../ sandbox-1#
[...]
root @ node1 Dec 15 11:33:11〜#git --version
git版本1.7 .4.1
root @ node1 Dec 15 11:33:14〜#
有关Git模式的更多信息,请参阅 Git不尝试实现文件系统的任何概念,文件系统例程到实际的文件系统实现。无论在Linux,MacOS,Windows等上运行的FAT32,NTFS,EXT3,XFS,NFS等文件系统上,Git都可以平等地工作。 EDIT: See Danny Lin's git-store-meta as a proposed solution to the versioning-metadata problem described below. I have yet to test it as of 2015-05-13. ORIGINAL QUESTION: Do the [Git does apparently, already control the "executeable attribute/perm" of a file (apparently portable for most OSes) and some other things like filesystem links. I'm seeking a more Unix/Linux/BSD/DarwinMacOSX-specific control mechanism for more/all metadata, namely all permissions and user/group ownership. ACLs and other metadata control optional. Trying to see if the stuff git is currently storing might prove useful to solve this problem.]
For more information about Git's mode, see this answer. Git's ability to store file metadata is limited to a simple subset of information to allow Git to track some basic file system changes allowing Git to track relevant changes for source code management; such as whether a file has been modified and whether a file is a regular file or an executable file. Git does not try to implement any notion of a file system, leaving file system routines to an actual file system implementation. This makes good sense to allow Git to work equally whether on a FAT32, NTFS, EXT3, XFS, NFS, etc. file system running on Linux, MacOS, Windows, etc. 这篇关于当在标准输出上说'创建模式'时,'git commit'是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
create|delete mode ...
lines in the git commit
output (example below) represent some sort of metadata control? (And/or, what do these lines represent in general?) These appear to be unix-like file-permission codes/representations, although I'm not sure -exactly- the mapping, but the bigger question is: what if anything does git do with these codes/settings/values? Does git attempt to leverage these saved codes in any way to prove helpful to solve metadata problems my superuser.com question ["How to reuse/extend etckeeper's metadata engine for git control of non-/etc filesystems, or extend git natively with said capability?"](https://superuser.com/questions/367729/how-to-reuse-extend- etckeepers-metadata-engine-for-git-control-of-non-etc-file)? I'm aware that git doesn't control all filesystem metadata.root@node1 Dec 15 09:40:45 ~/.../sandbox-1# git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: README
# new file: dummy-file-will-be-removed
# deleted: ownerfile
#
root@node1 Dec 15 09:40:45 ~/.../sandbox-1# git commit -m "testing git"
[master c5b0201] testing git
2 files changed, 1 insertions(+), 2 deletions(-)
create mode 100644 dummy-file-will-be-removed
delete mode 100644 ownerfile
root@node1 Dec 15 09:41:55 ~/.../sandbox-1#
[...]
root@node1 Dec 15 11:33:11 ~# git --version
git version 1.7.4.1
root@node1 Dec 15 11:33:14 ~#