【问题标题】:Is there a help page for the Git-Gui Options dialog?Git-Gui 选项对话框是否有帮助页面?
【发布时间】:2011-08-25 20:31:45
【问题描述】:

Git-Gui 有选项设置(在编辑>>选项下..)每个选项设置的某处都有描述吗?

我知道 Git-Gui man page 和 Git-config man page 命令行的手册页,但我找不到任何将选项对话框复选框与潜在命令行选项联系起来的东西。 (控制反转问题;-)

我正在使用 Git 1.7.3.1.msysgit.0 和 Git-Gui 0.3.GITGUI,它们的选项比 Nathanj 的 nathanj.github.com/gitguide/creating.html“Windows 上的 Git 指南”中显示的要多

【问题讨论】:

  • 我认为不幸的是,这个面板最接近的文档形式是 git-config 手册页。
  • 配置手册页的问题是所有选项的庞大性并试图将它们匹配起来。我最终阅读了代码以获得更好的理解。

标签: git git-gui


【解决方案1】:

Git Gui 选项帮助

Git Gui 选项(在 MacOSX 上称为 Preferences)直接从您的用户的 Git 配置文件中提取。

Git-Config(1) man(ual) page 详细介绍了许多(许多)可能的 git 配置选项。对于普通读者来说,找到正确的选项可能很困难。

Git Gui 由 Shawn O. Pearce 用 Tcl Tk 编写,托管在 Github

GitGui 选项对话框中提供的选项在 lib 目录中的“option.tcl”文件中有详细说明。

以下是配置可调参数的代码列表的摘录及其提供的选项对话框文本。

    {t user.name {mc "User Name"}}
    {t user.email {mc "Email Address"}}

    {b merge.summary {mc "Summarize Merge Commits"}}
    {i-1..5 merge.verbosity {mc "Merge Verbosity"}}
    {b merge.diffstat {mc "Show Diffstat After Merge"}}
    {t merge.tool {mc "Use Merge Tool"}}

    {b gui.trustmtime  {mc "Trust File Modification Timestamps"}}
    {b gui.pruneduringfetch {mc "Prune Tracking Branches During Fetch"}}
    {b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
    {b gui.textconv {mc "Use Textconv For Diffs and Blames"}}
    {b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
    {i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
    {i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}}
    {i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
    {i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
    {t gui.newbranchtemplate {mc "New Branch Name Template"}}
    {c gui.encoding {mc "Default File Contents Encoding"}}

或者,更清晰:

    "User Name" =>  user.name 
    "Email Address" =>  user.email

    "Summarize Merge Commits" =>  merge.summary 
    "Merge Verbosity" =>  merge.verbosity 
    "Show Diffstat After Merge" =>  merge.diffstat 
    "Use Merge Tool" =>  merge.tool 

    "Trust File Modification Timestamps" =>  gui.trustmtime  
    "Prune Tracking Branches During Fetch" =>  gui.pruneduringfetch 
    "Match Tracking Branches" =>  gui.matchtrackingbranch 
    "Use Textconv For Diffs and Blames" =>  gui.textconv 
    "Blame Copy Only On Changed Files" =>  gui.fastcopyblame 
    "Minimum Letters To Blame Copy On" =>  gui.copyblamethreshold 
    "Blame History Context Radius (days)" =>  gui.blamehistoryctx 
    "Number of Diff Context Lines" =>  gui.diffcontext 
    "Commit Message Text Width" =>  gui.commitmsgwidth 
    "New Branch Name Template" =>  gui.newbranchtemplate 
    "Default File Contents Encoding" =>  gui.encoding 

option.tcl file 中的proc save_config 中使用git config 命令设置或取消设置每个参数。

最初通过解析git-gui.sh shell(windows 版本链接)的proc _parse_config 部分中的配置文件来读取参数。

例如,搜索参数gui.copyblamethreshold,经过几页补丁链接、配置手册页链接和http://sitaramc.github.com/tips/blame-detection-and-C-levels.html等附加提示后发现

拼写检查器

“选项”对话框还提供了用于选择拼写字典以检查您的提交消息的选项。拼写检查器必须存在于您的系统上,否则它将被禁用,详细说明 here

【讨论】:

    【解决方案2】:

    您可以使用此tutorial 变得更好,因为它包含Git Gui 的屏幕截图。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多