Diagnosing problems - psjw12/gitextensions GitHub Wiki
When reporting issues to the team, it's often useful to provide various diagnostic information. This page describes methods for obtaining such diagnostic information.
What follows are general techniques. Use your judgement to determine which make sense to your situation.
You are responsible for reviewing the information produced by these commands before posting them publicly.
Press F12 to open the Command Log window. This shows recent commands executed by Git Extensions and data such as:
- The duration of the command
- The exit code (non-zero generally being an error)
- The command line arguments
You can also check a box to capture stack traces, after which you'll see information about the code that resulted in this command being executed.
Generally these are git commands, though other processes may be launched by Git Extensions too, and will appear here.
You can export the log to a single file and attach it to an issue.
Long running processes
$ cat log file(s) here | grep -n -P "\d{4,}ms" -A 10
110:16:40:15.214 4354ms 11896 UI 0 git rev-parse HEAD C:\mypath
111- at GitCommands.Logging.CommandLog.LogProcessStart(String fileName, String arguments, String workDir)
112- at GitCommands.Executable.ProcessWrapper..ctor(String fileName, String arguments, String workDir, Boolean createWindow, Boolean redirectInput, Boolean redirectOutput, Encoding outputEncoding)
113- at GitCommands.Executable.Start(ArgumentString arguments, Boolean createWindow, Boolean redirectInput, Boolean redirectOutput, Encoding outputEncoding)
114- at GitCommands.ExecutableExtensions.<GetOutputAsync>d__3.MoveNext()
115- at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
116- at GitCommands.ExecutableExtensions.GetOutputAsync(IExecutable executable, ArgumentString arguments, Byte[] input, Encoding outputEncoding, CommandCache cache, Boolean stripAnsiEscapeCodes)
117- at GitCommands.ExecutableExtensions.<>c__DisplayClass2_0.<GetOutput>b__0()
118- at Microsoft.VisualStudio.Threading.JoinableTaskFactory.ExecuteJob[T](Func`1 asyncMethod, JoinableTask job)
119- at Microsoft.VisualStudio.Threading.JoinableTaskFactory.RunAsync[T](Func`1 asyncMethod, Boolean synchronouslyBlocking, JoinableTaskCreationOptions creationOptions)
120- at Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run[T](Func`1 asyncMethod, JoinableTaskCreationOptions creationOptions)
Performance problems are usually analysed within the context of a specific repository.
The following commands should be run in Git Bash within the root directory of the repo in question.
When gathering this data, you may >>
output to a file and attach it, or copy from your terminal directly.
$ git for-each-ref --format="%(refname)" refs/ | cut -d"/" -f2 | uniq -c
20 heads
45 remotes
1 stash
11 tags
Where heads
are local branches, remotes
are remote branches, tags
are tags and stash
is always one.
$ git stash list | wc -l
18
$ git count-objects -vH
count: 6534
size: 14.34 MiB
in-pack: 91848
packs: 7
size-pack: 26.60 MiB
prune-packable: 6
garbage: 0
size-garbage: 0 bytes
$ git remote | wc -l
3
$ du -h -d 1 .git
35K .git/hooks
17K .git/info
198K .git/logs
241M .git/modules
69M .git/objects
17K .git/refs
311M .git
$ find . -type f -name '?*.*' -not -path "./.git*" -printf '%b.%f\0' |
awk -F . -v RS='\0' '
{s[$NF] += $1; n[$NF]++}
END {for (e in s) printf "%15d %4d %s\n", s[e]*512, n[e], e}' |
sort -n | numfmt --to=iec-i --suffix=B
0B 6 CopyComplete
1.0KiB 1 conf
1.0KiB 1 cur
...
510KiB 61 csproj
548KiB 5 bmp
584KiB 3 patch
1.2MiB 15 xml
1.3MiB 88 xshd
1.6MiB 232 h
2.0MiB 218 resx
2.2MiB 240 po
2.3MiB 33 pack
3.6MiB 12 pdb
5.1MiB 441 c
6.1MiB 607 png
8.1MiB 36 xlf
9.9MiB 199 dll
15MiB 1766 cs
21MiB 9 exe
21MiB 13 dic