Skip to content

Why set email and user.name for every repository? #105

Open
@lechner

Description

@lechner

Hi, should user.name and email really be added to every repository? I have both in my ~/.gitconfig? An alternative could be to warn if neither is available, and maybe add them (preferably globally) fromDEB_FULLNAME and DEB_EMAIL.

I stumbled on the issue because of a bug in golang-github-tcnksm-go-gitconfig, where tests were not properly isolated. (That merge request is here.) While this issue is not necessarily a bug, it may make it more difficult to change an email. Please let me know your favorite way to resolve, and I will submit a merge request. Thank you!

dh-make-golang/make.go

Lines 296 to 306 in f0afc0f

if debianName := getDebianName(); debianName != "TODO" {
if err := runGitCommandIn(dir, "config", "user.name", debianName); err != nil {
return dir, err
}
}
if debianEmail := getDebianEmail(); debianEmail != "TODO" {
if err := runGitCommandIn(dir, "config", "user.email", debianEmail); err != nil {
return dir, err
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions