のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

SourceTree 外部マージツールが起動しない

ターミナルを開き以下のコマンドを実行してみた。
(SourceTreeのメニュー>操作>ターミナルで開く)

.gitglobalの確認

$ git config --global --list
core.autocrlf=true
core.excludesfile=C:\Users\user01\Documents\gitignore_global.txt
user.name=user01
user.email=user01@gmail.com

difftool.sourcetree.cmd=
'C:/Program Files/WinMerge/WinMergeU.exe' "$LOCAL" "$REMOTE"

difftool.WinMerge.cmd=
'C:/Program Files/WinMerge/WinMergeU.exe'
 -e -r -u -x -wl -wr -dl "a/$MERGED" -dr "b/$MERGED" "$LOCAL" "$REMOTE"

difftool.WinMerge.trustexitcode=false

merge.tool=WinMerge
mergetool.WinMerge.cmd="C:/WinMerge/WinMergeU.exe" 
   //e //u //wl //wr "$LOCAL" "$BASE" "$REMOTE" //o "$MERGED"
mergetool.WinMerge.trustexitcode=true

コマンドでマージツールを起動してみる。
WinMergeのパスがおかしいようだ。

$ git mergetool
Merging:
/mingw64/libexec/git-core/git-mergetool--lib: line 136: 
C:/WinMerge/WinMergeU.exe: No such file or directory
merge of folder/file.h failed
Continue merging other unresolved paths (y/n) ? n

value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)

Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup

$ git config --global --list
core.autocrlf=true
core.excludesfile=C:\Users\m_fujii\Documents\gitignore_global.txt
user.name=user01
user.email=user01@gmail.com

diff.tool=WinMerge

difftool.prompt=false

difftool.WinMerge.cmd=
  'C:/Program Files/WinMerge/WinMergeU.exe'
   -e -r -u -x -wl -wr -dl "a/$MERGED" -dr "b/$MERGED" "$LOCAL" "$REMOTE"
difftool.WinMerge.trustexitcode=false


merge.tool=WinMerge

mergetool.prompt=false

mergetool.keepbackup=false

mergetool.WinMerge.cmd=
  'C:/Program Files/WinMerge/WinMergeU.exe' "$MERGED"

mergetool.WinMerge.trustexitcode=false

起動するようになった。

$ git mergetool

Gitが、おもしろいほどわかる基本の使い方33〈バージョン管理、SourceTree、Bitbucket〉

Gitが、おもしろいほどわかる基本の使い方33〈バージョン管理、SourceTree、Bitbucket〉

GitHub実践入門 ~Pull Requestによる開発の変革 (WEB+DB PRESS plus)

GitHub実践入門 ~Pull Requestによる開発の変革 (WEB+DB PRESS plus)

qiita.com

Octave max

>> help max
'max' is a built-in function from the file libinterp/corefcn/max.cc

 -- max (X)
 -- max (X, [], DIM)
 -- [W, IW] = max (X)
 -- max (X, Y)
     Find maximum values in the array X.

     For a vector argument, return the maximum value.  For a matrix
     argument, return a row vector with the maximum value of each
     column.  For a multi-dimensional array, 'max' operates along the
     first non-singleton dimension.

     If the optional third argument DIM is present then operate along
     this dimension.  In this case the second argument is ignored and
     should be set to the empty matrix.

     For two matrices (or a matrix and a scalar), return the pairwise
     maximum.

     Thus,

          max (max (X))

     returns the largest element of the 2-D matrix X, and

          max (2:5, pi)
              =>  3.1416  3.1416  4.0000  5.0000

     compares each element of the range '2:5' with 'pi', and returns a
     row vector of the maximum values.

     For complex arguments, the magnitude of the elements are used for
     comparison.  If the magnitudes are identical, then the results are
     ordered by phase angle in the range (-pi, pi].  Hence,

          max ([-1 i 1 -i])
              => -1

     because all entries have magnitude 1, but -1 has the largest phase
     angle with value pi.

     If called with one input and two output arguments, 'max' also
     returns the first index of the maximum value(s).  Thus,

          [x, ix] = max ([1, 3, 5, 2, 5])
              =>  x = 5
                  ix = 3

     See also: min, cummax, cummin.

Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the help@octave.org
mailing list.