Closed dfishburn closed 2 years ago
for debug, you can use:
:set verbosefile=/tmp/vim.debug
:20verbose call magit#show_magit('v')
You can anything else than show_magit
function of course.
For profiling, you can start and stop profiling with:
:call magit#utils#start_profile
:profile stop
When I try this:
:20verbose call magit#show_magit('v')
I get this:
if lines marked in hunk (with M), stage marked lines | src_dir = "17/windows/";
L stage the line under the cursor | if (!SA_BIN64_PATH.exists()) {
magit://C:/appdev/git/EdgeFoundry/[magit] B:3 1,0-1 1% File.java[java] B:2 739,0-1 42%
C:\appdev\git\EdgeFoundry
C:\...path...\db
Error detected while processing function magit#show_magit[107]..magit#update_buffer[36]..magit#sign#remove_all[6]..magit#sign#find_signs:
line 13:
E684: list index out of range: 1
E15: Invalid expression: split(components[2], '=')[1]
line 14:
E684: list index out of range: 1
E116: Invalid arguments for function str2nr(split(components[0], '=')[1])
E15: Invalid expression: str2nr(split(components[0], '=')[1])
line 15:
E121: Undefined variable: name
E15: Invalid expression: ( name =~# a:pattern && line_number >= a:startline && line_number <= a:endline )
line 13:
E684: list index out of range: 1
E15: Invalid expression: split(components[2], '=')[1]
line 14:
E684: list index out of range: 1
And if I try this:
:20verbose Magit
I get this:
C:\...path...\db
Error detected while processing function magit#show_magit[11]..magit#git#is_work_tree[3]..magit#utils#chdir:
line 8:
E472: Command failed
Error detected while processing function magit#show_magit:
line 11:
E170: Missing :endfor
Press ENTER or type command to continue
Weird though, if I quit the Magit window and run just :Magit it works.
But as soon as I add the verbosity, I get errors:
:20verbose Magit
Errors:
Unstaged changes | }
S if cursor on filename header, stage file |
if cursor in hunk, stage hunk |
if visual selection in hunk (with v), stage selection | if (OSChecker.isWindows()) {
if lines marked in hunk (with M), stage marked lines | src_dir = "17/windows/";
L stage the line under the cursor | if (!SA_BIN64_PATH.exists()) {
magit://C:/appdev/git/EdgeFoundry/[magit] B:3 1,0-1 1% Filejava[java] B:2 739,0-1 42%
C:\...path...\db
Error detected while processing function magit#show_magit[107]..magit#update_buffer[36]..magit#sign#remove_all[6]..magit#sign#find_signs:
line 13:
E684: list index out of range: 1
E15: Invalid expression: split(components[2], '=')[1]
line 14:
E684: list index out of range: 1
E116: Invalid arguments for function str2nr(split(components[0], '=')[1])
E15: Invalid expression: str2nr(split(components[0], '=')[1])
line 15:
E121: Undefined variable: name
E15: Invalid expression: ( name =~# a:pattern && line_number >= a:startline && line_number <= a:endline )
line 13:
E684: list index out of range: 1
E15: Invalid expression: split(components[2], '=')[1]
line 14:
E684: list index out of range: 1
So definitely an issue there somewhere.
David
It seems that 20verbose execute code branches that should not be executed. What you are seeing is errors because of verbose.
I can't test right now, but you may try to find the trade-off between correct execution and verbosity.
Hi @dfishburn , I appreciate your improvement help for windows support. Did you succeed to run vimagit commands in verbose mode?
Is there anyway to enable a log or something that would allow me to see all the commands (possibly the directory the commands were run from as well) ViMagit runs when it first launches.
Running on Windows I see the shell commands flash at the bottom of the screen (a vim thing) and it always seems like a lot of commands. Sometimes those commands can take a while to run.
This would give me the opportunity to run the commands myself and report back which commands appear to take a certain length of time.
Thanks, David