fix: always trigger removing file of separate git dir

This commit is contained in:
Junyi Du
2022-03-20 23:51:25 +08:00
committed by Tienson Qin
parent 535ea84068
commit 1f9ce0b0bf
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View File

@@ -31,6 +31,7 @@ strings.csv
.calva
resources/electron.js
.clj-kondo/.cache
.clj-kondo/babashka/sci
.lsp/
/libs/dist/
charlie/
@@ -38,4 +39,4 @@ charlie/
/.preprocessor-cljs
docker
android/app/src/main/assets/capacitor.plugin.json
ios/App/App/capacitor.config.json
ios/App/App/capacitor.config.json

View File

@@ -51,7 +51,7 @@
p (.join path graph-path ".git")]
(when (and (fs/existsSync p)
(.isFile (fs/statSync p)))
(let [content (.toString (fs/readFileSync p))
(let [content (string/trim (.toString (fs/readFileSync p)))
dir-path (string/replace content "gitdir: " "")]
(when (and content
(string/starts-with? content "gitdir:")