W moim repozytorium, jeśli wpisujęDlaczego `git diff` nie wywołuje narzędzia zewnętrznego diff?
$ git diff some-file
lub
$ git difftool some-file
uzyskać wyświetlanie w diff-końcowy. Myślę, że to nie powinno się zdarzyć, bo utworzyły zewnętrznego narzędzia diff, jak pokazano przez wyjście git config -l
:
$ git config -l
user.name=blah blah
user.email=blah blah
http.sslverify=true
diff.external=/home/daniel/bin/git-diff <--This is the important line
push.default=simple
core.filemode=false
core.editor=gedit
alias.tree=log --all --graph --decorate=short --color --format=format:'%C(bold blue)%h%C(reset) %C(auto)%d%C(reset)
%C(black)[%cr]%C(reset) %x09%C(black)%an: %s %C(reset)'
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.url=https://[email protected]/git/pyle.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.daniel.remote=origin
branch.daniel.merge=refs/heads/daniel
Plik git diff mowa w wierszu diff.external
wygląda następująco
#!/bin/bash
meld $2 $5
Dlaczego git diff
nie wywołuje meld?
mam ten sam problem, jeśli mogę ustawić wszystko tak, że git config -l
ma następującą linię:
diff.tool = meld
lub
diff.external = usr/bin/meld
Uwaga: Inne repozytoria na moim komputerze nie mam ten problem.
pokrewne, ale nie równoważne, SO pytania:
- What is the difference between
git diff
andgit difftool
? - Cannot make git diff use diff.external for external diff tool
Dlaczego używasz drugiego i piątego argumentu? – merlin2011
@ merlin2011: Rozumiem, że git diff przekazuje siedem argumentów do zewnętrznego narzędzia diff i to połączenie wymaga tylko dwóch z nich. – DanielSank