gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
933 stars 63 forks source link

Unknown escape sequence (and XX more errors) #82

Closed klieret closed 2 years ago

klieret commented 2 years ago

Describe the bug

Executing the touch command (as in the example) on any of my git repositories results in an error "208:22: unknown escape sequence (and 29 more errors)".

To Reproduce

My command:

git-xargs --loglevel debug  --repo hsf-training/organization --branch-name "test-branch"   --commit-message "Testing git-xargs"  touch "test123.test"   

The output is:

[git-xargs] INFO[2022-07-13T17:44:09-04:00] git-xargs running...
[git-xargs] DEBU[2022-07-13T17:44:09-04:00] Looking up filename provided repo             Name=organization Organization=hsf-training
[git-xargs] DEBU[2022-07-13T17:44:09-04:00] Successfully fetched repo                     Name=organization Organization=hsf-training
[git-xargs] DEBU[2022-07-13T17:44:09-04:00] Repo will have all targeted scripts run against it  Repository=organization
[git-xargs] DEBU[2022-07-13T17:44:09-04:00] Attempting to clone repository using GITHUB_OAUTH_TOKEN  Repo=organization
[git-xargs] DEBU[2022-07-13T17:44:10-04:00] Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Compressing objects: 100% (4/4), done.
Total 6 (delta 1), reused 0 (delta 0), pack-reused 0  Repo=organization
[git-xargs] DEBU[2022-07-13T17:44:10-04:00] Created branch                                Branch Name=refs/heads/test-branch Repo=organization
[git-xargs] DEBU[2022-07-13T17:44:10-04:00]                                               Repo=organization
[git-xargs] DEBU[2022-07-13T17:44:10-04:00] Executing command against local clone of repo...  Command="[touch test123.test]" Directory=/var/folders/g3/1y2_hl1j16scls01cxqm76s80000gn/T/git-xargs-organization653630454 Repo=organization
[git-xargs] DEBU[2022-07-13T17:44:10-04:00] Output of command [touch test123.test] for repo organization in directory /var/folders/g3/1y2_hl1j16scls01cxqm76s80000gn/T/git-xargs-organization653630454:
[git-xargs] DEBU[2022-07-13T17:44:10-04:00] Local repository worktree no longer clean, will stage and add new files and commit changes  Repo=organization
[git-xargs] DEBU[2022-07-13T17:44:10-04:00] Found untracked file. Adding to stage         Filepath=test123.test
[git-xargs] DEBU[2022-07-13T17:44:10-04:00] Error encountered while processing repo       Error="208:22: unknown escape sequence (and 29 more errors)" Repo name=organization

*****************************************************************
  GIT-XARGS RUN SUMMARY @ 2022-07-13 21:44:10.167923 +0000 UTC
  Runtime in seconds: 0
*****************************************************************

COMMAND SUPPLIED

[touch test123.test]

REPO SELECTION METHOD USED FOR THIS RUN - (see README.md for more information)

and this happens for me for all repositories that I have tried.

Versions:

klieret commented 2 years ago

Since I also experience the issue with multi-gitter, it does not seem to be related to git-xargs.

I have also found out that the issue disappears if I remove my .gitconfig, so probably this is where the escape sequences are being found (despite not causing any issues when running git normally). I suspect that this might be an issue with the go-git implementation.