导致git gc --auto的所有命令列表 [英] List of all commands that cause git gc --auto

查看:174
本文介绍了导致git gc --auto的所有命令列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在导致 git gc --auto 运行的命令的确切列表? git-gc(1)手册页只是说明:


- auto

使用此选项,git gc会检查是否需要进行任何管家操作;如果没有,它会退出而不执行任何工作。 某些git命令在执行可能会产生许多松散对象的操作后运行 git gc --auto



(强调增加)



我正在组织从SVN到Git的大型迁移过程。绝大多数用户将使用Windows PC,并且其中一小部分不是非技术性的。他们将使用TortoiseGit(因为它与他们熟悉的TortoiseSVN非常相似) - 我注意到TortoiseGit不包含任何功能来手动运行 git gc 所有。



非技术人员不能期望启动git bash命令行来运行 git gc --auto 来自相应的工作目录;当我们使用MsysGit的便携式发行版时,他们将不会拥有Git GUI Here ..窗口的上下文菜单快捷方式。



期望合理那么随着时间的推移,Git将主要自我维护,还是我需要尝试制定一种非技术性的用户友好的调用 git gc --auto

解决方案

  builtin / merge.c:const char * argv_gc_auto [] = {gc, --auto,NULL}; 
builtin / receive-pack.c:gc,--auto,--quiet,NULL,
git-am.sh:git gc --auto
git -rebase--interactive.sh:git gc --auto&&
git-svn.perl:command_noisy('gc','--auto');

git grep - --auto 在git.git上,这些结果看起来很有趣。值得注意的是 builtin / merge.c ,这意味着常见的 git pull 应该触发一个 git gc --auto



另外,除非您的'非技术'员工在做'相当'高级'点他们不会'非技术'了),我不明白他们为什么需要手动运行 git gc 而不是让 git gc --auto 处理所有内容。


Is there a definitive list of commands anywhere that cause git gc --auto to run? The git-gc(1) man page simply states:

--auto

With this option, git gc checks whether any housekeeping is required; if not, it exits without performing any work. Some git commands run git gc --auto after performing operations that could create many loose objects.

(emphasis added)

I'm in the process of organising a large migration from SVN to Git. The overwhelming majority of users will be on Windows PCs, and a not-insignificant portion of them are non-technical. They will be using TortoiseGit (as it closely matches TortoiseSVN, which they are already familiar with) - I've noticed that TortoiseGit does not include any functionality to run git gc manually at all.

The non-technical staff cannot be expected to have to launch a "git bash" command line to run git gc --auto from the appropriate working dir; and as we are using the "portable" distribution of MsysGit they will not have the "Git GUI Here.." windows shell context menu shortcut.

Is it reasonable to expect that over time Git will mostly self-maintain, or do I need to try and work out a non-technical user friendly method of invoking git gc --auto?

解决方案

builtin/merge.c:            const char *argv_gc_auto[] = { "gc", "--auto", NULL };
builtin/receive-pack.c:     "gc", "--auto", "--quiet", NULL,
git-am.sh:                  git gc --auto
git-rebase--interactive.sh: git gc --auto &&
git-svn.perl:               command_noisy('gc', '--auto');

From git grep -- --auto on git.git, those results looked interesting. The notable one is builtin/merge.c meaning that the ever so common git pull should trigger a git gc --auto.

Additionally, unless your 'non-technical' staff is doing rather 'advanced' stuff (at which point they wouldn't be 'non-technical' anymore), I don't see why they would ever need to run git gc manually instead of just letting git gc --auto handle everything.

这篇关于导致git gc --auto的所有命令列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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