The Git-Gui has options setting (under Edit>>Options..) Is there a description somewhere of each of the option settings?

I know there is the Man pages for the Git-Gui man page & Git-config man page command line, but I can't find anything that ties the option dialog check boxes to the potential command line options. (an inversion of control problem ;-)

I'm on Git 1.7.3.1.msysgit.0 and Git-Gui 0.3.GITGUI which has more options than shown in Nathanj's nathanj.github.com/gitguide/creating.html 'Guide to Git on Windows'

有帮助吗?

解决方案

The Git Gui Options Help

The Git Gui Options (called Preferences on MacOSX) are extracted directly from your, the user's, Git config files.

The Git-Config(1) man(ual) page details many (many) of the possible git configuration options. For the casual reader, finding the right option can be dificult.

The Git Gui is written in Tcl Tk by Shawn O. Pearce and is hosted on Github.

The options offered within the GitGui Options dialog is detailed in the 'option.tcl' file within the lib directory.

Below is an extract of the code listing of the config adjustable parameters and the option dialog text it offers.

    {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"}}

Or, more legibly:

    "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 

Each parameter is either set or unset with the git config command within the proc save_config within the option.tcl file.

The parameters are initially read by parsing the config files in the proc _parse_config part of the git-gui.sh shell(windows version linked).

For example, searching for the parameter gui.copyblamethreshold found, after a couple of pages of links to patches, links to the config man page and aditional tips such as http://sitaramc.github.com/tips/blame-detection-and-C-levels.html

Spell Checker

The Option dialog also offers the option for selecting a spelling dictionary for spell checking your commit messages. The spell checker must be present on your system, or it will be disabled, as detailed here.

其他提示

You can get better with this tutorial as it includes screen-shots for Git Gui.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top