MichaelMure / git-bug

Distributed, offline-first bug tracker embedded in git, with bridges

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when creating user

matclab opened this issue · comments

I just try to use git bug and started with

$ git bug user create
Error: 54:10: illegal character U+002E '.'
```


Version: 0.8.0
OS: Arch linux

Can I enable more debugging info ?

Starting with v0.8.0, git-bug has standardized on the word "new" to create identities, bugs, comments, etc. so your command should be:

git bug user new

Here's the help for the user sub-commands:

smoyer1@xps-15-7:~/git/git-bug$ git bug user --help
List identities

Usage:
  git-bug user [flags]
  git-bug user [command]

Available Commands:
  adopt       Adopt an existing identity as your own
  new         Create a new identity
  user        Display a user identity

Flags:
  -f, --format string   Select the output formatting style. Valid values are [default,json] (default "default")
  -h, --help            help for user

Use "git-bug user [command] --help" for more information about a command.

I should also note that I can't replicate your issue above - when I run that command, the word "create" is ignored and so the command git bug user is executed and the known identities are listed.

Actually the CLI rework happened just after v0.8.0, so it's still the old fashion there.

As for this problem, it seems that go-git/gcfg, the subcomponent of go-git parsing the git config, is having a problem with that special character somewhere in your config. Could you look and see where that character appears? Is that a legal thing?

Looks like a similar issue as #904

Thanks @MichaelMure for pointing this.

It looks like go-git doesn't like this part in my .gitconfig:

[difftool.latex]
      cmd = latexdiff "$LOCAL" "$REMOTE"

Which seems legit according to the doc

According to https://git-scm.com/docs/git-config#_configuration_file that's a deprecated syntax for a subsection. Now I suppose go-git should not break on it if it's accepted by the normal git.

According to https://git-scm.com/docs/git-config#_configuration_file that's a deprecated syntax for a subsection.

You're right, changing to [difftool "latex"] fix the problem.

Now I suppose go-git should not break on it if it's accepted by the normal git.

It would of course be better. Or at least output a more informative message to prevent deterring new user.
Thank you for your help !

The go-git library was updated to v5.5.1 recently. I doubt the project is going to release features that are deprecated in Git itself but it would be interesting to try it out.

This particular bit is actually explicitly unsupported: https://github.com/go-git/gcfg/blob/22f18f9a74d34e3b1a7d59cfa33043bc50ebe376/doc.go#L21

However, this package is very ancient code in golang scale (2012) and has been unmaintained for long (last real commit in 2018).

So should this be closed with "works as designed" since we're not going to change go-git's behavior?

Debatable. I'd think a PR upstream could be accepted but yeah we have a lot on our plate already.

Let's close, and if someone else is affected, comment here.