从git-gui调用外部difftool?

时间:2012-08-29 02:04:50

标签: git git-gui difftool

我配置了p4merge,以便从命令行开始执行“git difftool ...”,然后外部diff工具就会正确打开。

我想从“git gui”而不是命令行打开外部difftool。这可能吗?

似乎git-gui允许添加工具。但我不清楚如何让它发挥作用。有什么指针吗?

1 个答案:

答案 0 :(得分:4)

如果您已经设置了git difftool,则可以为其添加项目:

git-gui Tools->Add dialog difftool setup

添加工具对话框转录:

Tool Details box:
    Name: difftool
    Command: git difftool $FILENAME

Show a dialog before running: unchecked
    Ask the user to select a revision (sets $REVISION): unchecked
    Ask the user for additional arguments (sets $ARGS): unchecked

Don't show the command output window: checked
Run only if a diff is selected ($FILENAME not empty): checked
  Add globally: checked

虽然不是非常有用,因为它似乎不是一种分配热键或双击动作的方法。

如果它asking you annoying questions -y,可能需要在difftool命令中添加 <div class="row"> <div class="medium-6 columns"> <label> <input id="newPass" type="password" placeholder="New Password" name="newPass" data-toggle="pass-tips" onkeyup="checkPassword(); return false;"> <span id="chk-newPass" class="form-error"></span> </label> </div> <div class="dropdown-pane left" id="pass-tips" data-dropdown data-close-on-click="true" > <div class="row"> <div class="medium-12 columns"> <h6>Tips for strong password: </h6> <ul class="no-bullet"> <li><i id="pass-tips-char" class="fa fa-check-circle check-circle-green" aria-hidden="true"></i> Use at least 8 characters.</li> <li><i id="pass-tips-upper" class="fa fa-check-circle check-circle-green" aria-hidden="true"></i> Contain at least an uppercase letter.</li> <li><i id="pass-tips-special" class="fa fa-check-circle check-circle-green" aria-hidden="true"></i> Contain at least a special character.</li> <li><i id="pass-tips-num" class="fa fa-check-circle check-circle-green" aria-hidden="true"></i> Contain at least a number.</li> </ul> </div> </div> </div> <div class="medium-6 columns"> <label> <input id="confirmPass" type="password" placeholder="Confirm Password" name="confirmPass"> </label> </div> </div>