目录 搜索
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
文字

名称

git-index-pack  - 为现有打包归档文件生成包索引文件

概要

git index-pack [-v] [-o <index-file>] <pack-file>git index-pack --stdin [--fix-thin] [--keep] [-v] [-o <index-file>]                 [<pack-file>]

描述

从指定文件读取压缩归档文件(.pack),并为其构建一个包索引文件(.idx)。打包的压缩文件和包索引可以放在 Git 仓库的 objects / pack / 目录中。

选项

-v

详细了解正在发生的事情,包括进度状态。

-o <index-file>

将生成的包索引写入指定的文件。如果没有这个选项,包装索引文件的名称是通过将 .pack 替换为 .idx(并且如果打包归档的名称不以 .pack 结尾,则程序失败)从打包归档文件的名称构造的。

--stdin

提供此标志时,将从 stdin 中读取该包,然后将副本写入<pack-file>。如果未指定<pack-file>,那么该包将被写入当前 Git 存储库的 objects / pack / 目录,其默认名称将根据包内容确定。如果未指定<pack-file>,请考虑使用--keep 来防止此进程与之间的争用情况git repack

--fix-thin

通过将已分类对象所基于的排除对象添加到包中,修复由(请参阅git-pack-objects [1]获得的详细信息)git pack-objects --thin生成的“瘦” 包。这个选项与--stdin 一起使用才有意义。

--keep

在将索引移动到其最终目标之前,请为关联的包文件创建一个空的.keep 文件。该选项通常需要使用--stdin 来防止同时git repack进程删除新构建的包和索引,然后才能更新引用以使用包中包含的对象。

--keep=<msg>

像--keep 在将索引移动到其最终目标之前创建一个.keep 文件,而不是创建一个空文件位置,然后<msg>将LF放入.keep 文件中。稍后可以在所有.keep 文件中搜索该<msg>消息以找到任何已失效的文件。

--index-version=<version>,<offset>

这仅供测试套件使用。它允许强制生成的包索引的版本,并强制位于给定偏移量以上的对象上的64位索引条目。

--strict

死亡,如果包装包含破碎的物体或链接。

--check-self-contained-and-connected

如果包装中含有损坏的链接,则死亡。仅限内部使用。

--threads=<n>

指定解析变化量时产生的线程数。这要求使用 pthread 编译索引包,否则该选项会被忽略并带有警告。这是为了减少多处理器机器的打包时间。然而,增量搜索窗口所需的内存量乘以线程数量。指定0将导致 Git 自动检测 CPU 的数量并使用最多3个线程。

--max-input-size=<size>

死亡,如果包装大于<尺寸>。

注意

索引创建完成后,将对对象名称列表进行排序,并将该列表的 SHA-1 哈希值打印到 stdout。如果还使用了--stdin,则以“pack \ t”或“keep \ t”作为前缀,前提是已成功创建新的.keep 文件。这对删除用作锁的.keep 文件非常有用,可防止上述git repack竞争。

上一篇: 下一篇: