JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.37k stars 2.39k forks source link

Git prompt in submodule folder #1489

Closed akelge closed 2 years ago

akelge commented 2 years ago

Code of Conduct

What happened?

If I cd into a folder in a git submodule a weird git segment shows up  onto (/) at master ≡

I checked the code and it seems that segment is generated by this piece of code

if g.env.hasFolder(g.gitWorkingFolder + "/rebase-merge") {
        origin := getPrettyNameOrigin("rebase-merge/head-name")
        onto := g.getGitRefFileSymbolicName("rebase-merge/onto")
        onto = g.formatHEAD(onto)
        step := g.getFileContents(g.gitWorkingFolder, "rebase-merge/msgnum")
        total := g.getFileContents(g.gitWorkingFolder, "rebase-merge/end")
        icon := g.props.getString(RebaseIcon, "\uE728 ")
        g.HEAD = fmt.Sprintf("%s%s onto %s%s (%s/%s) at %s", icon, origin, branchIcon, onto, step, total, g.HEAD)
        return
    }

but there is no rebase-merge folder or file anywhere in that git tree.

Theme

pure

What OS are you seeing the problem on?

macOS

Which shell are you using?

zsh

Log output

Version: 6.38.2

Segments:

ConsoleTitle(true)   -   0 ms - ~/Src/ifson/ansible/roles/fail2ban
session(false)       -   0 ms - 
root(false)          -   0 ms - 
path(true)           -   0 ms - ~/Src/ifson/ansible/roles/fail2ban 
git(true)            -  20 ms -   onto  (/) at master ≡ 
executiontime(false) -   0 ms - 
aws(false)           -   0 ms - 
kubectl(true)        -   0 ms - 
command(false)       -   7 ms - 
python(false)        -   0 ms - 
exit(true)           -   0 ms - ❯ 

Run duration: 30.780916ms

Logs:

2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 6.75µs, args: XDG_CACHE_HOME
2021/12/23 08:07:20 getCachePath duration: 46µs, args: 
2021/12/23 08:07:20 getArgs duration: 42ns, args: 
2021/12/23 08:07:20 getArgs duration: 84ns, args: 
2021/12/23 08:07:20 getShellName duration: 83ns, args: 
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 1.708µs, args: OMP_CACHE_DISABLED
2021/12/23 08:07:20 isRunningAsRoot duration: 10.208µs, args: 
2021/12/23 08:07:20 getcwd duration: 22.708µs, args: 
2021/12/23 08:07:20 getPathSeperator duration: 41ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 41ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 41ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 41ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 42ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 83ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 42ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 84ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 83ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 42ns, args: 
2021/12/23 08:07:20 getShellName duration: 42ns, args: 
2021/12/23 08:07:20 getCurrentUser duration: 250ns, args: 
2021/12/23 08:07:20 getHostName duration: 7.75µs, args: 
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 2.667µs, args: SSH_CONNECTION
2021/12/23 08:07:20 getcwd duration: 83ns, args: 
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 1.167µs, args: SSH_CONNECTION
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 1.125µs, args: SSH_CLIENT
2021/12/23 08:07:20 getCurrentUser duration: 209ns, args: 
2021/12/23 08:07:20 getRuntimeGOOS duration: 83ns, args: 
2021/12/23 08:07:20 getHostName duration: 6.083µs, args: 
2021/12/23 08:07:20 isRunningAsRoot duration: 417ns, args: 
2021/12/23 08:07:20 getcwd duration: 84ns, args: 
2021/12/23 08:07:20 isRunningAsRoot duration: 333ns, args: 
2021/12/23 08:07:20 getcwd duration: 83ns, args: 
2021/12/23 08:07:20 getcwd duration: 83ns, args: 
2021/12/23 08:07:20 getArgs duration: 41ns, args: 
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 getRuntimeGOOS duration: 83ns, args: 
2021/12/23 08:07:20 getRuntimeGOOS duration: 83ns, args: 
2021/12/23 08:07:20 getPathSeperator duration: 42ns, args: 
2021/12/23 08:07:20 getRuntimeGOOS duration: 83ns, args: 
2021/12/23 08:07:20 stackCount duration: 125ns, args: 
2021/12/23 08:07:20 getcwd duration: 84ns, args: 
2021/12/23 08:07:20 getRuntimeGOOS duration: 84ns, args: 
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 1.417µs, args: WSL_DISTRO_NAME
2021/12/23 08:07:20 isWsl duration: 6.125µs, args: 
2021/12/23 08:07:20 hasCommand duration: 45.041µs, args: git
2021/12/23 08:07:20 getcwd duration: 41ns, args: 
2021/12/23 08:07:20 hasParentFilePath duration: 17.042µs, args: .git
2021/12/23 08:07:20 getFileContent duration: 40.166µs, args: /Users/andre/Src/ifson/ansible/roles/.git
2021/12/23 08:07:20 error: getFileContent
open ../.git/modules/roles/gitdir: not a directory
2021/12/23 08:07:20 getFileContent duration: 8.167µs, args: ../.git/modules/roles/gitdir
2021/12/23 08:07:20 debug: runCommand
# branch.oid 2d0c94b7927a334bb1c8b9876a95759c30cc9ae1
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
2021/12/23 08:07:20 runCommand duration: 10.9495ms, args: git -C  --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2
2021/12/23 08:07:20 hasFolder duration: 3.375µs, args: ../.git/modules/roles/rebase-merge
2021/12/23 08:07:20 error: getFileContent
open ../.git/modules/roles/rebase-merge/head-name: not a directory
2021/12/23 08:07:20 getFileContent duration: 6.958µs, args: ../.git/modules/roles/rebase-merge/head-name
2021/12/23 08:07:20 error: getFileContent
open ../.git/modules/roles/rebase-merge/onto: not a directory
2021/12/23 08:07:20 getFileContent duration: 6.375µs, args: ../.git/modules/roles/rebase-merge/onto
2021/12/23 08:07:20 debug: runCommand

2021/12/23 08:07:20 runCommand duration: 9.176708ms, args: git -C  --no-optional-locks -c core.quotepath=false -c color.status=false name-rev --name-only --exclude=tags/* 
2021/12/23 08:07:20 error: getFileContent
open ../.git/modules/roles/rebase-merge/msgnum: not a directory
2021/12/23 08:07:20 getFileContent duration: 9.458µs, args: ../.git/modules/roles/rebase-merge/msgnum
2021/12/23 08:07:20 error: getFileContent
open ../.git/modules/roles/rebase-merge/end: not a directory
2021/12/23 08:07:20 getFileContent duration: 3.625µs, args: ../.git/modules/roles/rebase-merge/end
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 executionTime duration: 42ns, args: 
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 1.166µs, args: AWS_VAULT
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 958ns, args: AWS_PROFILE
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 958ns, args: AWS_REGION
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 958ns, args: AWS_DEFAULT_REGION
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 1.208µs, args: AWS_CONFIG_FILE
2021/12/23 08:07:20 getFileContent duration: 40.083µs, args: /Users/andre/.aws/config
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 834ns, args: KUBECONFIG
2021/12/23 08:07:20 getFileContent duration: 36.959µs, args: /Users/andre/.kube/config
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 2.875µs, args: KUBE_PS1_ENABLED
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 hasCommand duration: 11.5µs, args: /bin/sh
2021/12/23 08:07:20 error: runCommand
cmd.Start() failed with ''
2021/12/23 08:07:20 runCommand duration: 4.022125ms, args: /bin/sh -c ifconfig utun2 > /dev/null 2>&1 && echo '<#00FF00></>' 
2021/12/23 08:07:20 runShellCommand duration: 4.032375ms, args: /bin/sh ifconfig utun2 > /dev/null 2>&1 && echo '<#00FF00></>' 
2021/12/23 08:07:20 error: runCommand
cmd.Start() failed with ''
2021/12/23 08:07:20 runCommand duration: 73.292µs, args: /bin/sh -c  echo ''
2021/12/23 08:07:20 runShellCommand duration: 75.625µs, args: /bin/sh  echo ''
2021/12/23 08:07:20 error: runCommand
cmd.Start() failed with ''
2021/12/23 08:07:20 runCommand duration: 3.451875ms, args: /bin/sh -c ifconfig utun2 > /dev/null 2>&1 
2021/12/23 08:07:20 runShellCommand duration: 3.454583ms, args: /bin/sh ifconfig utun2 > /dev/null 2>&1 
2021/12/23 08:07:20 error: runCommand
cmd.Start() failed with ''
2021/12/23 08:07:20 runCommand duration: 69.333µs, args: /bin/sh -c  echo '<#00FF00></>' || echo ''
2021/12/23 08:07:20 runShellCommand duration: 71.25µs, args: /bin/sh  echo '<#00FF00></>' || echo ''
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 958ns, args: VIRTUAL_ENV
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 833ns, args: CONDA_ENV_PATH
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 750ns, args: CONDA_DEFAULT_ENV
2021/12/23 08:07:20 debug: getenv

2021/12/23 08:07:20 getenv duration: 792ns, args: PYENV_VERSION
2021/12/23 08:07:20 getcwd duration: 42ns, args: 
2021/12/23 08:07:20 lastErrorCode duration: 42ns, args:
JanDeDobbeleer commented 2 years ago

@akelge this seems to exist though: .git/modules/roles/rebase-merge maybe a lingering folder somehow in that submodule?

akelge commented 2 years ago
~/Src/ifson/ansible master ≡
❯ find . -name rebase-merge
~/Src/ifson/ansible master ≡
❯

nothing comes up; more

~/Src/ifson/ansible master ≡
❯ ls -l .git/modules/roles/rebase-merge
ls: .git/modules/roles/rebase-merge: No such file or directory
~/Src/ifson/ansible master ≡
❯

Finally

❯ ls -l .git/modules/roles/
total 64
-rw-rw-r--   1 andre  staff     51 Dec 15 17:39 COMMIT_EDITMSG
-rw-rw-r--   1 andre  staff      0 Dec 23 08:44 FETCH_HEAD
-rw-rw-r--   1 andre  staff     23 Dec  2 15:14 HEAD
-rw-rw-r--   1 andre  staff    343 Dec  2 15:17 config
-rw-rw-r--   1 andre  staff     73 Oct 24 09:47 description
drwxrwxr-x  15 andre  staff    480 Oct 24 09:47 hooks/
-rw-rw-r--   1 andre  staff  10040 Dec 21 07:16 index
drwxrwxr-x   3 andre  staff     96 Oct 24 09:47 info/
drwxrwxr-x   4 andre  staff    128 Oct 24 09:47 logs/
drwxrwxr-x  29 andre  staff    928 Dec 23 07:50 objects/
-rw-rw-r--   1 andre  staff    114 Oct 24 09:47 packed-refs
drwxrwxr-x   5 andre  staff    160 Oct 24 09:47 refs/

Also in the debug log

2021/12/23 08:07:20 error: getFileContent
open ../.git/modules/roles/rebase-merge/msgnum: not a directory
2021/12/23 08:07:20 getFileContent duration: 9.458µs, args: ../.git/modules/roles/rebase-merge/msgnum
2021/12/23 08:07:20 error: getFileContent
open ../.git/modules/roles/rebase-merge/end: not a directory

Dunno where omp finds that file; let me add that this happens in all subfolders of submodules, not in the main submodule folder, just in subfolders of the main submodule folder

JanDeDobbeleer commented 2 years ago

@akelge can you update to the latest version? There were some changes done to the way we fetch the root folder.

akelge commented 2 years ago

I did, with brew, now I am running 6.39.0, but the bug is still there, sorry.

BTW, can I suggest you to add head to brew formula, to allow me (and others) to use HEAD?

akelge commented 2 years ago

Here is the debug


Version: 6.39.0

Segments:

ConsoleTitle(true) -   0 ms - 
session(true)  -   0 ms - %{%}%{%}%{%} %{%}%{%}andre@dragon%{%}%{%} %{%}%{%}%{%}
path(true)     -   0 ms - %{%}%{%}%{%}  %{%}%{%}fail2ban%{%}%{%} %{%}%{%}%{%}
git(true)      -   9 ms - %{%}%{%}%{%} %{%}%{%}fatal: No names found, cannot describe anything.
%{%}%{%} %{%}%{%}%{%}
battery(true)  -  16 ms - %{%}%{%}%{%} %{%}%{%}90%{%}%{%} %{%}%{%}%{%}
node(false)    -   0 ms - 
shell(true)    -   0 ms - %{%}%{%}%{%} ﲵ %{%}%{%}zsh%{%}%{%} %{%}%{%}%{%}
root(false)    -   0 ms - 
text(true)     -   0 ms - %{%}%{%}%{%} %{%}%{%}NO CONFIG%{%}%{%} %{%}%{%}%{%}
exit(true)     -   0 ms - %{%}%{%}%{%}%{%}%{%} %{%}%{%} %{%}%{%}%{%}

Run duration: 28.184875ms

Logs:

2021/12/23 19:56:09 debug: getenv

2021/12/23 19:56:09 getenv duration: 7.792µs, args: XDG_CACHE_HOME
2021/12/23 19:56:09 getCachePath duration: 80.875µs, args: 
2021/12/23 19:56:09 getArgs duration: 83ns, args: 
2021/12/23 19:56:09 getArgs duration: 83ns, args: 
2021/12/23 19:56:09 getShellName duration: 2.753208ms, args: 
2021/12/23 19:56:09 debug: getenv

2021/12/23 19:56:09 getenv duration: 2.209µs, args: OMP_CACHE_DISABLED
2021/12/23 19:56:09 isRunningAsRoot duration: 10.917µs, args: 
2021/12/23 19:56:09 getcwd duration: 61.583µs, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 84ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getShellName duration: 83ns, args: 
2021/12/23 19:56:09 getCurrentUser duration: 208ns, args: 
2021/12/23 19:56:09 getHostName duration: 6.25µs, args: 
2021/12/23 19:56:09 getcwd duration: 125ns, args: 
2021/12/23 19:56:09 debug: getenv

2021/12/23 19:56:09 getenv duration: 1.541µs, args: SSH_CONNECTION
2021/12/23 19:56:09 debug: getenv

2021/12/23 19:56:09 getenv duration: 1.167µs, args: SSH_CLIENT
2021/12/23 19:56:09 getCurrentUser duration: 209ns, args: 
2021/12/23 19:56:09 getRuntimeGOOS duration: 84ns, args: 
2021/12/23 19:56:09 getHostName duration: 4.75µs, args: 
2021/12/23 19:56:09 debug: getenv

2021/12/23 19:56:09 getenv duration: 1.083µs, args: POSH_SESSION_DEFAULT_USER
2021/12/23 19:56:09 getcwd duration: 84ns, args: 
2021/12/23 19:56:09 getcwd duration: 83ns, args: 
2021/12/23 19:56:09 getArgs duration: 167ns, args: 
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 getRuntimeGOOS duration: 42ns, args: 
2021/12/23 19:56:09 getRuntimeGOOS duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 84ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 84ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getRuntimeGOOS duration: 83ns, args: 
2021/12/23 19:56:09 stackCount duration: 41ns, args: 
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 debug: getenv

2021/12/23 19:56:09 getenv duration: 1.333µs, args: WSL_DISTRO_NAME
2021/12/23 19:56:09 isWsl duration: 3.792µs, args: 
2021/12/23 19:56:09 getRuntimeGOOS duration: 83ns, args: 
2021/12/23 19:56:09 hasCommand duration: 41.792µs, args: git
2021/12/23 19:56:09 getcwd duration: 84ns, args: 
2021/12/23 19:56:09 hasParentFilePath duration: 15µs, args: .git
2021/12/23 19:56:09 getFileContent duration: 29.25µs, args: /Users/andre/Src/ifson/ansible/roles/.git
2021/12/23 19:56:09 error: getFileContent
open ../.git/modules/roles/gitdir: not a directory
2021/12/23 19:56:09 getFileContent duration: 10.459µs, args: ../.git/modules/roles/gitdir
2021/12/23 19:56:09 error: getFileContent
open ../.git/modules/roles/HEAD: not a directory
2021/12/23 19:56:09 getFileContent duration: 3.292µs, args: ../.git/modules/roles/HEAD
2021/12/23 19:56:09 error: runCommand
cmd.Start() failed with 'fatal: No names found, cannot describe anything.
'
2021/12/23 19:56:09 runCommand duration: 9.421625ms, args: git -C  --no-optional-locks -c core.quotepath=false -c color.status=false describe --tags --exact-match
2021/12/23 19:56:09 error: getFileContent
open .././logs/refs/stash: no such file or directory
2021/12/23 19:56:09 getFileContent duration: 7.208µs, args: .././logs/refs/stash
2021/12/23 19:56:09 getcwd duration: 83ns, args: 
2021/12/23 19:56:09 getBatteryInfo duration: 16.668584ms, args: 
2021/12/23 19:56:09 getcwd duration: 83ns, args: 
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 getcwd duration: 0s, args: 
2021/12/23 19:56:09 getPathSeperator duration: 84ns, args: 
2021/12/23 19:56:09 hasFiles duration: 125.042µs, args: *.js
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 hasFiles duration: 39.583µs, args: *.ts
2021/12/23 19:56:09 getcwd duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 hasFiles duration: 7.917µs, args: package.json
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 hasFiles duration: 6.708µs, args: .nvmrc
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 hasFiles duration: 6.375µs, args: pnpm-workspace.yaml
2021/12/23 19:56:09 getcwd duration: 0s, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 hasFiles duration: 6.166µs, args: .pnpmfile.cjs
2021/12/23 19:56:09 getcwd duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 hasFiles duration: 5.792µs, args: .npmrc
2021/12/23 19:56:09 getcwd duration: 41ns, args: 
2021/12/23 19:56:09 getShellName duration: 375ns, args: 
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 isRunningAsRoot duration: 500ns, args: 
2021/12/23 19:56:09 getcwd duration: 42ns, args: 
2021/12/23 19:56:09 isRunningAsRoot duration: 250ns, args: 
2021/12/23 19:56:09 getcwd duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 42ns, args: 
2021/12/23 19:56:09 getPathSeperator duration: 41ns, args: 
2021/12/23 19:56:09 getShellName duration: 42ns, args: 
2021/12/23 19:56:09 getCurrentUser duration: 167ns, args: 
2021/12/23 19:56:09 getHostName duration: 6.917µs, args: 
2021/12/23 19:56:09 getcwd duration: 83ns, args: 
2021/12/23 19:56:09 lastErrorCode duration: 42ns, args: 
JanDeDobbeleer commented 2 years ago

BTW, can I suggest you to add head to brew formula, to allow me (and others) to use HEAD?

@akelge what do you mean with that?

JanDeDobbeleer commented 2 years ago

@akelge BTW, in the log you just provided there's a different issue, right?

akelge commented 2 years ago

BTW, can I suggest you to add head to brew formula, to allow me (and others) to use HEAD?

@akelge what do you mean with that?

if you add an head with the proper url from github, you can install the HEAD version on homebrew, I will work on that and submit a PR next week.

akelge commented 2 years ago

@akelge BTW, in the log you just provided there's a different issue, right?

To be honest I did not check thoroughly the debug log, but the result is the same as before, sorry I can't provide more info

lnu commented 2 years ago

I did some tests yesterday with a repo containing a submodule and I could not reproduce your issue.
Is your repo public? Or can you point us to a github repo that would match yours?

akelge commented 2 years ago

I will set up something similar on GitHub next week. Happy Holidays everyone

Il ven 24 dic 2021, 07:31 Laurent Nullens @.***> ha scritto:

I did some tests yesterday with a repo containing a submodule and I could not reproduce your issue. Is your repo public? Or can you point us to a github repo that would match yours?

— Reply to this email directly, view it on GitHub https://github.com/JanDeDobbeleer/oh-my-posh/issues/1489#issuecomment-1000680204, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXGU6SRZHKBGOBCRQ3DDXDUSQHVBANCNFSM5KUEHRPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

akelge commented 2 years ago

I did some tests yesterday with a repo containing a submodule and I could not reproduce your issue. Is your repo public? Or can you point us to a github repo that would match yours?

Here you have https://github.com/akelge/test-repo Of course you have to git clone --recurse, the if you cd test-submodule/inner-folder you will see

~/Src/ifson/testrepo/test-repo/test-submodule/inner-folder   onto  (/) at main ≡
lnu commented 2 years ago

really nice! it fails as expected... let's check it 😄 I get it: since the .git links to the parent folder .git, it fails in the worktree handling but it's not a worktree...

lnu commented 2 years ago

looks better:

image

pr is on the way

lnu commented 2 years ago

https://github.com/JanDeDobbeleer/oh-my-posh/pull/1500

lnu commented 2 years ago

@akelge looks good on both macos and windows on my side. The status of the submodule should just work like any simple git repo.

🎄

akelge commented 2 years ago

Cool, thanks a lot

Il ven 24 dic 2021, 16:21 Laurent Nullens @.***> ha scritto:

@akelge https://github.com/akelge looks good on both macos and windows on my side. The status of the submodule should just work like any simple git repo.

— Reply to this email directly, view it on GitHub https://github.com/JanDeDobbeleer/oh-my-posh/issues/1489#issuecomment-1000872986, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXGU6QWGFOJID7P7L7PHNDUSSFV3ANCNFSM5KUEHRPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

JanDeDobbeleer commented 2 years ago

@akelge if you can confirm, please close the issue and merry Christmas!

akelge commented 2 years ago

I will, dunno when, family gathering on going 😊

Il ven 24 dic 2021, 17:28 Jan De Dobbeleer @.***> ha scritto:

@akelge https://github.com/akelge if you can confirm, please close the issue and merry Christmas!

— Reply to this email directly, view it on GitHub https://github.com/JanDeDobbeleer/oh-my-posh/issues/1489#issuecomment-1000892667, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXGU6WPLHCBEEAXCMCJZPLUSSNRPANCNFSM5KUEHRPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

akelge commented 2 years ago

Confirmed working now :) thanks a lot

~/Src/ifson/testrepo/test-repo/test-submodule/inner-folder main ≡
❯ ll
total 0
-rw-rw-r--  1 andre  staff  0 Dec 24 13:56 you-should-have-been-bitten-by-the-bug
github-actions[bot] commented 8 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.