joemasilotti / joemasilotti/git-auto-tagger

Tagging commits with double quotes (`"`) doesn't work

Open
#1 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Ruby
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

First, add the following to `.tags.yml`

```yaml
- tag: broken
commit: 'Hello, "Joe"'
```

1. `git commit -m 'Hello, "Joe"' --allow-empty"
1. `./auto-tag.sh`

I expect this to tag the commit with `broken`. Instead, I get the following error:

```
main.rb:26:in `block (2 levels) in ': Commit with message 'Hello, "Joe"' not found. (RuntimeError)
```

This is occurring because string escaping is naive, I think.

```ruby
# tool/main.rb:22
sha = syscall("git rev-parse :/\"#{commit}\"")
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.