kubernetes / git-sync

A sidecar app which clones a git repo and keeps it in sync with the upstream.
Apache License 2.0
2.21k stars 410 forks source link

invalid argument when using git-sync v4 with GitLab repository #919

Open lucabtg opened 2 weeks ago

lucabtg commented 2 weeks ago

We updated git-sync from v3 to v4. Previously it ran without any issues, however after the update, the git-sync sidecar container of our pod crashes with the following errors:

"command result","stdout":"","stderr":"notice: HEAD points to an unborn branch (git-sync)\nnotice: No default references" .... "msg":"too many failures, aborting","error":"readlink /tmp/git/current: invalid argument","failCount":1

Authentication is done via an access token (tested in local git). Git-sync does not work either on our commit branch nor on the main branch of the private repo. Do you have any ideas what might be the cause of the issue?

adwk67 commented 2 weeks ago

For some more context: we tried to test the same git-sync call (as far as is possible) against a private github repository (access token, using the main branch, same gitsync 4.x etc.), which worked without problem.

thockin commented 2 weeks ago

I'm going to need you to post all of the flags that you used to try to reproduce this. We have a battery of end-to-end tests, so you must be doing something that I have not considered before.

Ideally, you could run your sink with '-v6' and post the full logs here. That will show me the command line arguments, which commands it executed and what the results of them were.

lucabtg commented 2 weeks ago

Thanks for your answer! This is the command with all the flags we're using right now:

git-sync --repo= --ref=main --depth=1 --period=20s --link=current --root=/tmp/git --verbose=6 --git-config='safe.directory:/tmp/git,http.sslVerify:false'

The corresponding logs are:

{"logger":"","ts":"2024-08-28 07:55:52.215110","caller":{"file":"main.go","line":528},"level":0,"msg":"starting up","pid":8,"uid":1000,"gid":0,"home":"/stk","flags":["--add-user=false","--askpass-url=","--branch=","--change-permissions=0","--cookie-file=false","--credential=[]","--
{"logger":"","ts":"2024-08-28 07:55:52.215437","caller":{"file":"main.go","line":613},"level":2,"msg":"created private gitconfig file","path":"/tmp/git-sync.gitconfig.273869993"}
{"logger":"","ts":"2024-08-28 07:55:52.215497","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global gc.autoDetach false"}
{"logger":"","ts":"2024-08-28 07:55:52.218330","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.782773ms"}
{"logger":"","ts":"2024-08-28 07:55:52.218403","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global gc.pruneExpire now"}
{"logger":"","ts":"2024-08-28 07:55:52.226229","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"7.777354ms"}
{"logger":"","ts":"2024-08-28 07:55:52.226258","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global credential.helper \"cache --timeout 3600\""}
{"logger":"","ts":"2024-08-28 07:55:52.281476","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"55.179183ms"}
{"logger":"","ts":"2024-08-28 07:55:52.281576","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global core.askPass true"}
{"logger":"","ts":"2024-08-28 07:55:52.283900","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.274704ms"}
{"logger":"","ts":"2024-08-28 07:55:52.283958","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global safe.directory *"}
{"logger":"","ts":"2024-08-28 07:55:52.286138","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.134505ms"}
{"logger":"","ts":"2024-08-28 07:55:52.286173","caller":{"file":"main.go","line":1747},"level":1,"msg":"setting up git SSH credentials"}                                                                                                                                                    
{"logger":"","ts":"2024-08-28 07:55:52.286205","caller":{"file":"main.go","line":1892},"level":1,"msg":"setting additional git configs","configs":[{},{}]}
{"logger":"","ts":"2024-08-28 07:55:52.286244","caller":{"file":"main.go","line":1894},"level":5,"msg":"running command","cwd":"","cmd":"git config --global safe.directory /tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.288334","caller":{"file":"main.go","line":1894},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.036647ms"}
{"logger":"","ts":"2024-08-28 07:55:52.288371","caller":{"file":"main.go","line":1894},"level":5,"msg":"running command","cwd":"","cmd":"git config --global http.sslVerify false"}
{"logger":"","ts":"2024-08-28 07:55:52.290286","caller":{"file":"main.go","line":1894},"level":6,"msg":"command result","stdout":"","stderr":"","time":"1.859783ms"}
{"logger":"","ts":"2024-08-28 07:55:52.290331","caller":{"file":"main.go","line":1558},"level":3,"msg":"syncing","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-08-28 07:55:52.290346","caller":{"file":"main.go","line":1734},"level":1,"msg":"storing git credential","url":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-08-28 07:55:52.290433","caller":{"file":"main.go","line":1738},"level":5,"msg":"running command","cwd":"","cmd":"git credential approve"}
{"logger":"","ts":"2024-08-28 07:55:52.292093","caller":{"file":"main.go","line":1738},"level":6,"msg":"command result","stdout":"","stderr":"","time":"1.615245ms"}
{"logger":"","ts":"2024-08-28 07:55:52.292137","caller":{"file":"main.go","line":1093},"level":3,"msg":"repo directory exists","path":"/tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.292153","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.292219","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-08-28 07:55:52.294117","caller":{"file":"main.go","line":1176},"level":6,"msg":"command result","stdout":"/tmp/git","stderr":"","time":"1.786947ms"}
{"logger":"","ts":"2024-08-28 07:55:52.294152","caller":{"file":"main.go","line":1189},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-08-28 07:55:52.381773","caller":{"file":"main.go","line":1189},"level":6,"msg":"command result","stdout":"","stderr":"notice: HEAD points to an unborn branch (git-sync)\nnotice: No default references","time":"87.575774ms"}
{"logger":"","ts":"2024-08-28 07:55:52.381819","caller":{"file":"main.go","line":1095},"level":4,"msg":"repo directory is valid","path":"/tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.381837","caller":{"file":"main.go","line":1122},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote get-url origin"}
{"logger":"","ts":"2024-08-28 07:55:52.384369","caller":{"file":"main.go","line":1122},"level":6,"msg":"command result","stdout":<GITLAB_REPO_URL>","stderr":"","time":"2.46834ms"}
{"logger":"","ts":"2024-08-28 07:55:52.384457","caller":{"file":"main.go","line":804},"msg":"too many failures, aborting","error":"readlink /tmp/git/current: invalid argument","failCount":1}

We are running git-sync in a sidecar container to our pod.

thockin commented 2 weeks ago

It looks.like readlink() is legitimately failing.

Can you run ls -la /tmp/git - what is the "current" item?

lucabtg commented 2 weeks ago

Unfortunately our Container always crashes, so we can't do the command. In another container, that still uses v3 we get the following output: image

thockin commented 2 weeks ago

Can you run it with the container command set to [ sleep, inf ] and then kubectl exec into it and run the exact same git-sync command by hand?

Which exact version of git-sync is this?

Are you mounting a volume somewhere?

lucabtg commented 2 weeks ago

We are using git-sync v4.2.1 and are mounting an emptyDir volume on /tmp/git to make the synced files available to another container in our pod.

When running the command by hand, it tries multiple times to sync the data. We stopped it after a few tries and it did actually download our data from git successfully. Here are the logs:

{"logger":"","ts":"2024-09-02 12:33:23.935547","caller":{"file":"main.go","line":528},"level":0,"msg":"starting up","pid":21,"uid":1000,"gid":0,"home":"/stk","flags":["--add-user=false","--askpass-url=","--branch=","--change-permissions=0","--cookie-file=false","--credential=[]","--depth=1","--dest=","--error-file=","--exechook-backoff=3s","--exechook-command=","--exechook-timeout=30s","--git=git","--git-config=safe.directory:/tmp/git,http.sslVerify:false","--git-gc=always","--group-write=false","--help=false","--http-bind=","--http-metrics=false","--http-pprof=false","--link=current","--man=false","--max-failures=0","--max-sync-failures=0","--one-time=false","--password=REDACTED","--password-file=","--period=20s","--ref=main","--repo=<GITLAB_REPO_URL>","--rev=","--root=/tmp/git","--sparse-checkout-file=","--ssh=false","--ssh-key-file=[/etc/git-secret/ssh]","--ssh-known-hosts=true","--ssh-known-hosts-file=/etc/git-secret/known_hosts","--stale-worktree-timeout=0s","--submodules=recursive","--sync-hook-command=","--sync-on-signal=","--sync-timeout=2m0s","--timeout=0","--touch-file=","--username=<USERNAME>","--v=-1","--verbose=6","--version=false","--wait=0","--webhook-backoff=3s","--webhook-method=POST","--webhook-success-status=200","--webhook-timeout=1s","--webhook-url="]}
{"logger":"","ts":"2024-09-02 12:33:23.935972","caller":{"file":"main.go","line":613},"level":2,"msg":"created private gitconfig file","path":"/tmp/git-sync.gitconfig.1434890694"}
{"logger":"","ts":"2024-09-02 12:33:23.936061","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global gc.autoDetach false"}
{"logger":"","ts":"2024-09-02 12:33:23.938965","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.82655ms"}
{"logger":"","ts":"2024-09-02 12:33:23.939013","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global gc.pruneExpire now"}
{"logger":"","ts":"2024-09-02 12:33:23.941168","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.113101ms"}
{"logger":"","ts":"2024-09-02 12:33:23.941213","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global credential.helper \"cache --timeout 3600\""}
{"logger":"","ts":"2024-09-02 12:33:23.943403","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.01272ms"}
{"logger":"","ts":"2024-09-02 12:33:23.943432","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global core.askPass true"}
{"logger":"","ts":"2024-09-02 12:33:23.945290","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"1.768362ms"}
{"logger":"","ts":"2024-09-02 12:33:23.945319","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global safe.directory *"}
{"logger":"","ts":"2024-09-02 12:33:23.947374","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.012074ms"}
{"logger":"","ts":"2024-09-02 12:33:23.947398","caller":{"file":"main.go","line":1747},"level":1,"msg":"setting up git SSH credentials"}
{"logger":"","ts":"2024-09-02 12:33:23.947440","caller":{"file":"main.go","line":1892},"level":1,"msg":"setting additional git configs","configs":[{},{}]}
{"logger":"","ts":"2024-09-02 12:33:23.947523","caller":{"file":"main.go","line":1894},"level":5,"msg":"running command","cwd":"","cmd":"git config --global safe.directory /tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:23.990366","caller":{"file":"main.go","line":1894},"level":6,"msg":"command result","stdout":"","stderr":"","time":"42.753864ms"}
{"logger":"","ts":"2024-09-02 12:33:23.990419","caller":{"file":"main.go","line":1894},"level":5,"msg":"running command","cwd":"","cmd":"git config --global http.sslVerify false"}
{"logger":"","ts":"2024-09-02 12:33:23.993090","caller":{"file":"main.go","line":1894},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.588993ms"}
{"logger":"","ts":"2024-09-02 12:33:23.993177","caller":{"file":"main.go","line":1558},"level":3,"msg":"syncing","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:33:23.993200","caller":{"file":"main.go","line":1734},"level":1,"msg":"storing git credential","url":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:33:23.993242","caller":{"file":"main.go","line":1738},"level":5,"msg":"running command","cwd":"","cmd":"git credential approve"}
{"logger":"","ts":"2024-09-02 12:33:24.000322","caller":{"file":"main.go","line":1738},"level":6,"msg":"command result","stdout":"","stderr":"","time":"7.034962ms"}
{"logger":"","ts":"2024-09-02 12:33:24.000371","caller":{"file":"main.go","line":1093},"level":3,"msg":"repo directory exists","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:24.000390","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:24.000446","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-09-02 12:33:24.002387","caller":{"file":"main.go","line":1177},"msg":"can't get repo toplevel","error":"Run(git rev-parse --show-toplevel): exit status 128: { stdout: \"\", stderr: \"fatal: not a git repository (or any parent up to mount point /tmp)\\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\" }","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:24.002429","caller":{"file":"main.go","line":1101},"level":0,"msg":"repo directory was empty or failed checks","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:24.002486","caller":{"file":"main.go","line":1273},"level":4,"msg":"removing path recursively","path":"/tmp/git/current","isDir":true}
{"logger":"","ts":"2024-09-02 12:33:24.002840","caller":{"file":"main.go","line":1111},"level":0,"msg":"initializing repo directory","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:24.002862","caller":{"file":"main.go","line":1112},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git init -b git-sync"}
{"logger":"","ts":"2024-09-02 12:33:24.006349","caller":{"file":"main.go","line":1112},"level":6,"msg":"command result","stdout":"Initialized empty Git repository in /tmp/git/.git/","stderr":"","time":"3.436978ms"}
{"logger":"","ts":"2024-09-02 12:33:24.006381","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:24.006433","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-09-02 12:33:24.008672","caller":{"file":"main.go","line":1176},"level":6,"msg":"command result","stdout":"/tmp/git","stderr":"","time":"2.196518ms"}
{"logger":"","ts":"2024-09-02 12:33:24.008707","caller":{"file":"main.go","line":1189},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:33:24.096502","caller":{"file":"main.go","line":1189},"level":6,"msg":"command result","stdout":"","stderr":"notice: HEAD points to an unborn branch (git-sync)\nnotice: No default references","time":"87.712325ms"}
{"logger":"","ts":"2024-09-02 12:33:24.096583","caller":{"file":"main.go","line":1122},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote get-url origin"}
{"logger":"","ts":"2024-09-02 12:33:24.098704","caller":{"file":"main.go","line":1127},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote add origin <GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:33:24.100974","caller":{"file":"main.go","line":1127},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.202403ms"}
{"logger":"","ts":"2024-09-02 12:33:24.101011","caller":{"file":"main.go","line":1577},"level":3,"msg":"current state","hash":"","worktree":""}
{"logger":"","ts":"2024-09-02 12:33:24.101065","caller":{"file":"main.go","line":1683},"level":2,"msg":"fetching","ref":"main","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:33:24.101121","caller":{"file":"main.go","line":1701},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fetch <GITLAB_REPO_URL> main --verbose --no-progress --prune --no-auto-gc --depth 1"}
{"logger":"","ts":"2024-09-02 12:33:26.076139","caller":{"file":"main.go","line":1701},"level":6,"msg":"command result","stdout":"","stderr":"warning: redirecting to <GITLAB_REPO_URL>.git/\nPOST git-upload-pack (305 bytes)\nPOST git-upload-pack (179 bytes)\nFrom <GITLAB_REPO_URL>\n * branch            main       -> FETCH_HEAD","time":"1.974927713s"}
{"logger":"","ts":"2024-09-02 12:33:26.076230","caller":{"file":"main.go","line":1589},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse FETCH_HEAD^{}"}
{"logger":"","ts":"2024-09-02 12:33:26.079088","caller":{"file":"main.go","line":1589},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.776728ms"}
{"logger":"","ts":"2024-09-02 12:33:26.079143","caller":{"file":"main.go","line":1615},"level":0,"msg":"update required","ref":"main","local":"","remote":"4baa83ecffd74047377a205c79ebcfc67444fe62","syncCount":0}
{"logger":"","ts":"2024-09-02 12:33:26.079179","caller":{"file":"main.go","line":1621},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git reset --soft 4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:26.090782","caller":{"file":"main.go","line":1621},"level":6,"msg":"command result","stdout":"","stderr":"","time":"11.549914ms"}
{"logger":"","ts":"2024-09-02 12:33:26.090845","caller":{"file":"main.go","line":1352},"level":1,"msg":"adding worktree","path":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:26.090890","caller":{"file":"main.go","line":1353},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git worktree add --force --detach /tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62 4baa83ecffd74047377a205c79ebcfc67444fe62 --no-checkout"}
{"logger":"","ts":"2024-09-02 12:33:26.097302","caller":{"file":"main.go","line":1353},"level":6,"msg":"command result","stdout":"","stderr":"Preparing worktree (detached HEAD 4baa83e)","time":"6.326333ms"}
{"logger":"","ts":"2024-09-02 12:33:26.097439","caller":{"file":"main.go","line":1424},"level":1,"msg":"setting worktree HEAD","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:26.097478","caller":{"file":"main.go","line":1425},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git reset --hard 4baa83ecffd74047377a205c79ebcfc67444fe62 --"}
{"logger":"","ts":"2024-09-02 12:33:26.105957","caller":{"file":"main.go","line":1425},"level":6,"msg":"command result","stdout":"HEAD is now at 4baa83e Merge branch 'staging-branch-airflow' into 'main'","stderr":"","time":"8.408553ms"}
{"logger":"","ts":"2024-09-02 12:33:26.105991","caller":{"file":"main.go","line":1432},"level":1,"msg":"updating submodules"}
{"logger":"","ts":"2024-09-02 12:33:26.106013","caller":{"file":"main.go","line":1440},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git submodule update --init --recursive --depth 1"}
{"logger":"","ts":"2024-09-02 12:33:26.395148","caller":{"file":"main.go","line":1440},"level":6,"msg":"command result","stdout":"","stderr":"","time":"289.070304ms"}
{"logger":"","ts":"2024-09-02 12:33:26.395231","caller":{"file":"main.go","line":1305},"level":2,"msg":"creating tmp symlink","dir":"/tmp/git","link":"tmp-link","target":".worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:26.395307","caller":{"file":"main.go","line":1310},"level":2,"msg":"renaming symlink","root":"/tmp/git","oldName":"tmp-link","newName":"current"}
{"logger":"","ts":"2024-09-02 12:33:26.395352","caller":{"file":"main.go","line":1661},"level":0,"msg":"updated successfully","ref":"main","remote":"4baa83ecffd74047377a205c79ebcfc67444fe62","syncCount":1}
{"logger":"","ts":"2024-09-02 12:33:26.395426","caller":{"file":"main.go","line":1146},"level":3,"msg":"cleaning up stale worktrees","currentHash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:26.396191","caller":{"file":"main.go","line":1269},"level":4,"msg":"skipping path","path":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:26.396228","caller":{"file":"main.go","line":872},"level":3,"msg":"next sync","waitTime":"20s","syncCount":1}
{"logger":"","ts":"2024-09-02 12:33:46.411434","caller":{"file":"main.go","line":1558},"level":3,"msg":"syncing","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:33:46.411526","caller":{"file":"main.go","line":1734},"level":1,"msg":"storing git credential","url":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:33:46.411546","caller":{"file":"main.go","line":1738},"level":5,"msg":"running command","cwd":"","cmd":"git credential approve"}
{"logger":"","ts":"2024-09-02 12:33:46.417448","caller":{"file":"main.go","line":1738},"level":6,"msg":"command result","stdout":"","stderr":"","time":"5.748918ms"}
{"logger":"","ts":"2024-09-02 12:33:46.417500","caller":{"file":"main.go","line":1093},"level":3,"msg":"repo directory exists","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:46.417520","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:46.417594","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-09-02 12:33:46.420130","caller":{"file":"main.go","line":1176},"level":6,"msg":"command result","stdout":"/tmp/git","stderr":"","time":"2.462958ms"}
{"logger":"","ts":"2024-09-02 12:33:46.420179","caller":{"file":"main.go","line":1189},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:33:46.428802","caller":{"file":"main.go","line":1189},"level":6,"msg":"command result","stdout":"","stderr":"","time":"8.400988ms"}
{"logger":"","ts":"2024-09-02 12:33:46.428839","caller":{"file":"main.go","line":1095},"level":4,"msg":"repo directory is valid","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:33:46.428861","caller":{"file":"main.go","line":1122},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote get-url origin"}
{"logger":"","ts":"2024-09-02 12:33:46.490993","caller":{"file":"main.go","line":1122},"level":6,"msg":"command result","stdout":"<GITLAB_REPO_URL>","stderr":"","time":"62.077637ms"}
{"logger":"","ts":"2024-09-02 12:33:46.491051","caller":{"file":"main.go","line":1577},"level":3,"msg":"current state","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:46.491084","caller":{"file":"main.go","line":1683},"level":2,"msg":"fetching","ref":"main","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:33:46.491107","caller":{"file":"main.go","line":1701},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fetch <GITLAB_REPO_URL> main --verbose --no-progress --prune --no-auto-gc --depth 1"}
{"logger":"","ts":"2024-09-02 12:33:48.173222","caller":{"file":"main.go","line":1701},"level":6,"msg":"command result","stdout":"","stderr":"warning: redirecting to <GITLAB_REPO_URL>.git/\nPOST git-upload-pack (305 bytes)\nPOST git-upload-pack (272 bytes)\nFrom <GITLAB_REPO_URL>\n * branch            main       -> FETCH_HEAD","time":"1.681982692s"}
{"logger":"","ts":"2024-09-02 12:33:48.173329","caller":{"file":"main.go","line":1589},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse FETCH_HEAD^{}"}
{"logger":"","ts":"2024-09-02 12:33:48.176112","caller":{"file":"main.go","line":1589},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.723776ms"}
{"logger":"","ts":"2024-09-02 12:33:48.176152","caller":{"file":"main.go","line":1597},"level":3,"msg":"current hash is same as remote","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:48.176172","caller":{"file":"main.go","line":1202},"level":3,"msg":"sanity-checking worktree","repo":"/tmp/git","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:48.176238","caller":{"file":"main.go","line":1214},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git rev-parse HEAD"}
{"logger":"","ts":"2024-09-02 12:33:48.178648","caller":{"file":"main.go","line":1214},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.35986ms"}
{"logger":"","ts":"2024-09-02 12:33:48.178685","caller":{"file":"main.go","line":1226},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:33:48.192379","caller":{"file":"main.go","line":1226},"level":6,"msg":"command result","stdout":"","stderr":"","time":"13.584939ms"}
{"logger":"","ts":"2024-09-02 12:33:48.192420","caller":{"file":"main.go","line":1675},"level":2,"msg":"update not required","ref":"main","remote":"4baa83ecffd74047377a205c79ebcfc67444fe62","syncCount":1}
{"logger":"","ts":"2024-09-02 12:33:48.192554","caller":{"file":"main.go","line":1146},"level":3,"msg":"cleaning up stale worktrees","currentHash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:48.192649","caller":{"file":"main.go","line":1269},"level":4,"msg":"skipping path","path":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:33:48.192678","caller":{"file":"main.go","line":872},"level":3,"msg":"next sync","waitTime":"20s","syncCount":2}
{"logger":"","ts":"2024-09-02 12:34:08.210322","caller":{"file":"main.go","line":1558},"level":3,"msg":"syncing","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:08.210388","caller":{"file":"main.go","line":1734},"level":1,"msg":"storing git credential","url":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:08.210444","caller":{"file":"main.go","line":1738},"level":5,"msg":"running command","cwd":"","cmd":"git credential approve"}
{"logger":"","ts":"2024-09-02 12:34:08.216149","caller":{"file":"main.go","line":1738},"level":6,"msg":"command result","stdout":"","stderr":"","time":"5.581813ms"}
{"logger":"","ts":"2024-09-02 12:34:08.216204","caller":{"file":"main.go","line":1093},"level":3,"msg":"repo directory exists","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:08.216222","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:08.216471","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-09-02 12:34:08.218695","caller":{"file":"main.go","line":1176},"level":6,"msg":"command result","stdout":"/tmp/git","stderr":"","time":"2.143576ms"}
{"logger":"","ts":"2024-09-02 12:34:08.218731","caller":{"file":"main.go","line":1189},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:34:08.226631","caller":{"file":"main.go","line":1189},"level":6,"msg":"command result","stdout":"","stderr":"","time":"7.837187ms"}
{"logger":"","ts":"2024-09-02 12:34:08.226671","caller":{"file":"main.go","line":1095},"level":4,"msg":"repo directory is valid","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:08.226687","caller":{"file":"main.go","line":1122},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote get-url origin"}
{"logger":"","ts":"2024-09-02 12:34:08.228782","caller":{"file":"main.go","line":1122},"level":6,"msg":"command result","stdout":"<GITLAB_REPO_URL>","stderr":"","time":"2.043759ms"}
{"logger":"","ts":"2024-09-02 12:34:08.228827","caller":{"file":"main.go","line":1577},"level":3,"msg":"current state","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:08.228867","caller":{"file":"main.go","line":1683},"level":2,"msg":"fetching","ref":"main","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:08.229018","caller":{"file":"main.go","line":1701},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fetch <GITLAB_REPO_URL> main --verbose --no-progress --prune --no-auto-gc --depth 1"}
{"logger":"","ts":"2024-09-02 12:34:09.820355","caller":{"file":"main.go","line":1701},"level":6,"msg":"command result","stdout":"","stderr":"warning: redirecting to <GITLAB_REPO_URL>.git/\nPOST git-upload-pack (305 bytes)\nPOST git-upload-pack (272 bytes)\nFrom <GITLAB_REPO_URL>\n * branch            main       -> FETCH_HEAD","time":"1.591270854s"}
{"logger":"","ts":"2024-09-02 12:34:09.820426","caller":{"file":"main.go","line":1589},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse FETCH_HEAD^{}"}
{"logger":"","ts":"2024-09-02 12:34:09.823181","caller":{"file":"main.go","line":1589},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.634049ms"}
{"logger":"","ts":"2024-09-02 12:34:09.823220","caller":{"file":"main.go","line":1597},"level":3,"msg":"current hash is same as remote","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:09.823235","caller":{"file":"main.go","line":1202},"level":3,"msg":"sanity-checking worktree","repo":"/tmp/git","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:09.823371","caller":{"file":"main.go","line":1214},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git rev-parse HEAD"}
{"logger":"","ts":"2024-09-02 12:34:09.825804","caller":{"file":"main.go","line":1214},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.332854ms"}
{"logger":"","ts":"2024-09-02 12:34:09.825839","caller":{"file":"main.go","line":1226},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:34:09.892736","caller":{"file":"main.go","line":1226},"level":6,"msg":"command result","stdout":"","stderr":"","time":"66.842395ms"}
{"logger":"","ts":"2024-09-02 12:34:09.892793","caller":{"file":"main.go","line":1675},"level":2,"msg":"update not required","ref":"main","remote":"4baa83ecffd74047377a205c79ebcfc67444fe62","syncCount":1}
{"logger":"","ts":"2024-09-02 12:34:09.892846","caller":{"file":"main.go","line":1146},"level":3,"msg":"cleaning up stale worktrees","currentHash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:09.892918","caller":{"file":"main.go","line":1269},"level":4,"msg":"skipping path","path":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:09.892940","caller":{"file":"main.go","line":872},"level":3,"msg":"next sync","waitTime":"20s","syncCount":3}
{"logger":"","ts":"2024-09-02 12:34:29.894090","caller":{"file":"main.go","line":1558},"level":3,"msg":"syncing","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:29.894243","caller":{"file":"main.go","line":1734},"level":1,"msg":"storing git credential","url":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:29.894327","caller":{"file":"main.go","line":1738},"level":5,"msg":"running command","cwd":"","cmd":"git credential approve"}
{"logger":"","ts":"2024-09-02 12:34:29.900801","caller":{"file":"main.go","line":1738},"level":6,"msg":"command result","stdout":"","stderr":"","time":"6.353892ms"}
{"logger":"","ts":"2024-09-02 12:34:29.900854","caller":{"file":"main.go","line":1093},"level":3,"msg":"repo directory exists","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:29.900892","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:29.900985","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-09-02 12:34:29.902850","caller":{"file":"main.go","line":1176},"level":6,"msg":"command result","stdout":"/tmp/git","stderr":"","time":"1.811662ms"}
{"logger":"","ts":"2024-09-02 12:34:29.902895","caller":{"file":"main.go","line":1189},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:34:29.909929","caller":{"file":"main.go","line":1189},"level":6,"msg":"command result","stdout":"","stderr":"","time":"6.908483ms"}
{"logger":"","ts":"2024-09-02 12:34:29.909971","caller":{"file":"main.go","line":1095},"level":4,"msg":"repo directory is valid","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:29.910002","caller":{"file":"main.go","line":1122},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote get-url origin"}
{"logger":"","ts":"2024-09-02 12:34:29.911956","caller":{"file":"main.go","line":1122},"level":6,"msg":"command result","stdout":"<GITLAB_REPO_URL>","stderr":"","time":"1.849755ms"}
{"logger":"","ts":"2024-09-02 12:34:29.911997","caller":{"file":"main.go","line":1577},"level":3,"msg":"current state","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:29.912029","caller":{"file":"main.go","line":1683},"level":2,"msg":"fetching","ref":"main","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:29.912084","caller":{"file":"main.go","line":1701},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fetch <GITLAB_REPO_URL> main --verbose --no-progress --prune --no-auto-gc --depth 1"}
{"logger":"","ts":"2024-09-02 12:34:31.824881","caller":{"file":"main.go","line":1701},"level":6,"msg":"command result","stdout":"","stderr":"warning: redirecting to <GITLAB_REPO_URL>.git/\nPOST git-upload-pack (305 bytes)\nPOST git-upload-pack (272 bytes)\nFrom <GITLAB_REPO_URL>\n * branch            main       -> FETCH_HEAD","time":"1.912712902s"}
{"logger":"","ts":"2024-09-02 12:34:31.824995","caller":{"file":"main.go","line":1589},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse FETCH_HEAD^{}"}
{"logger":"","ts":"2024-09-02 12:34:31.827318","caller":{"file":"main.go","line":1589},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.195568ms"}
{"logger":"","ts":"2024-09-02 12:34:31.827367","caller":{"file":"main.go","line":1597},"level":3,"msg":"current hash is same as remote","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:31.827437","caller":{"file":"main.go","line":1202},"level":3,"msg":"sanity-checking worktree","repo":"/tmp/git","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:31.827548","caller":{"file":"main.go","line":1214},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git rev-parse HEAD"}
{"logger":"","ts":"2024-09-02 12:34:31.829552","caller":{"file":"main.go","line":1214},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"1.932291ms"}
{"logger":"","ts":"2024-09-02 12:34:31.829590","caller":{"file":"main.go","line":1226},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:34:31.890341","caller":{"file":"main.go","line":1226},"level":6,"msg":"command result","stdout":"","stderr":"","time":"60.695262ms"}
{"logger":"","ts":"2024-09-02 12:34:31.890433","caller":{"file":"main.go","line":1675},"level":2,"msg":"update not required","ref":"main","remote":"4baa83ecffd74047377a205c79ebcfc67444fe62","syncCount":1}
{"logger":"","ts":"2024-09-02 12:34:31.890510","caller":{"file":"main.go","line":1146},"level":3,"msg":"cleaning up stale worktrees","currentHash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:31.890592","caller":{"file":"main.go","line":1269},"level":4,"msg":"skipping path","path":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:31.890613","caller":{"file":"main.go","line":872},"level":3,"msg":"next sync","waitTime":"20s","syncCount":4}
{"logger":"","ts":"2024-09-02 12:34:51.907280","caller":{"file":"main.go","line":1558},"level":3,"msg":"syncing","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:51.907419","caller":{"file":"main.go","line":1734},"level":1,"msg":"storing git credential","url":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:51.907489","caller":{"file":"main.go","line":1738},"level":5,"msg":"running command","cwd":"","cmd":"git credential approve"}
{"logger":"","ts":"2024-09-02 12:34:51.913592","caller":{"file":"main.go","line":1738},"level":6,"msg":"command result","stdout":"","stderr":"","time":"5.966738ms"}
{"logger":"","ts":"2024-09-02 12:34:51.913656","caller":{"file":"main.go","line":1093},"level":3,"msg":"repo directory exists","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:51.913676","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:51.913745","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-09-02 12:34:51.915777","caller":{"file":"main.go","line":1176},"level":6,"msg":"command result","stdout":"/tmp/git","stderr":"","time":"1.981692ms"}
{"logger":"","ts":"2024-09-02 12:34:51.915811","caller":{"file":"main.go","line":1189},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:34:51.923911","caller":{"file":"main.go","line":1189},"level":6,"msg":"command result","stdout":"","stderr":"","time":"8.048737ms"}
{"logger":"","ts":"2024-09-02 12:34:51.923944","caller":{"file":"main.go","line":1095},"level":4,"msg":"repo directory is valid","path":"/tmp/git"}
{"logger":"","ts":"2024-09-02 12:34:51.923964","caller":{"file":"main.go","line":1122},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote get-url origin"}
{"logger":"","ts":"2024-09-02 12:34:51.926034","caller":{"file":"main.go","line":1122},"level":6,"msg":"command result","stdout":"<GITLAB_REPO_URL>","stderr":"","time":"1.998767ms"}
{"logger":"","ts":"2024-09-02 12:34:51.926068","caller":{"file":"main.go","line":1577},"level":3,"msg":"current state","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:51.926096","caller":{"file":"main.go","line":1683},"level":2,"msg":"fetching","ref":"main","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-09-02 12:34:51.926148","caller":{"file":"main.go","line":1701},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fetch <GITLAB_REPO_URL> main --verbose --no-progress --prune --no-auto-gc --depth 1"}
{"logger":"","ts":"2024-09-02 12:34:53.590596","caller":{"file":"main.go","line":1701},"level":6,"msg":"command result","stdout":"","stderr":"warning: redirecting to <GITLAB_REPO_URL>.git/\nPOST git-upload-pack (305 bytes)\nPOST git-upload-pack (272 bytes)\nFrom <GITLAB_REPO_URL>\n * branch            main       -> FETCH_HEAD","time":"1.664245198s"}
{"logger":"","ts":"2024-09-02 12:34:53.590665","caller":{"file":"main.go","line":1589},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse FETCH_HEAD^{}"}
{"logger":"","ts":"2024-09-02 12:34:53.593314","caller":{"file":"main.go","line":1589},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.593625ms"}
{"logger":"","ts":"2024-09-02 12:34:53.593358","caller":{"file":"main.go","line":1597},"level":3,"msg":"current hash is same as remote","hash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:53.593386","caller":{"file":"main.go","line":1202},"level":3,"msg":"sanity-checking worktree","repo":"/tmp/git","worktree":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:53.593480","caller":{"file":"main.go","line":1214},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git rev-parse HEAD"}
{"logger":"","ts":"2024-09-02 12:34:53.595844","caller":{"file":"main.go","line":1214},"level":6,"msg":"command result","stdout":"4baa83ecffd74047377a205c79ebcfc67444fe62","stderr":"","time":"2.107544ms"}
{"logger":"","ts":"2024-09-02 12:34:53.595871","caller":{"file":"main.go","line":1226},"level":5,"msg":"running command","cwd":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-09-02 12:34:53.603568","caller":{"file":"main.go","line":1226},"level":6,"msg":"command result","stdout":"","stderr":"","time":"7.640503ms"}
{"logger":"","ts":"2024-09-02 12:34:53.603602","caller":{"file":"main.go","line":1675},"level":2,"msg":"update not required","ref":"main","remote":"4baa83ecffd74047377a205c79ebcfc67444fe62","syncCount":1}
{"logger":"","ts":"2024-09-02 12:34:53.603680","caller":{"file":"main.go","line":1146},"level":3,"msg":"cleaning up stale worktrees","currentHash":"4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:53.603740","caller":{"file":"main.go","line":1269},"level":4,"msg":"skipping path","path":"/tmp/git/.worktrees/4baa83ecffd74047377a205c79ebcfc67444fe62"}
{"logger":"","ts":"2024-09-02 12:34:53.603769","caller":{"file":"main.go","line":872},"level":3,"msg":"next sync","waitTime":"20s","syncCount":5}
thockin commented 1 week ago

That log seems to indicate a smashing success. Something has to be different...

thockin commented 1 week ago

The only way I can reproduce the readlink "invalid argument" error is if I force the symlink to be a non-symlink. There's SOMETHING in that directory that is colliding.

thockin commented 7 hours ago

Any update on this?