Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe this is documented in some place I didn't spot, but I expected
that when I set GIT_AUTHOR_{NAME,EMAIL} it would affect the operation
of git-tag, but it doesn't seem to. When I create tags it seems to
completely ignore those variables.

Should it be doing that? Here's a test script demonstrating the issue:

    #!/bin/sh -e
    # Set defaults
    git config --global user.name "Ævar Arnfjörð Bjarmason"
    git config --global user.email "avarab@xxxxxxxxx"

    rm -rf /tmp/test-git
    git init /tmp/test-git
    cd /tmp/test-git

    make_commit() {
        file=$1
        content=$2
        echo $content >$file
        git add $file
        git commit -m"$file: $content" $file
        git --no-pager log -1 HEAD | grep ^Author
    }

    make_commit README "testing content"
    git config user.name "Test User"
    git config user.email "test@xxxxxxxxxxx"
    make_commit README "testing content again"
    git tag -a -m"annotated tag" tag-name-1
    git --no-pager show tag-name-1 | grep ^Author

    GIT_AUTHOR_NAME="Tag Test User"
GIT_AUTHOR_EMAIL="tagtest@xxxxxxxxxxx" git tag -a -m"another annotated
tag" tag-name-2
    git --no-pager show tag-name-2 | grep ^Author

Which outputs:

    $ sh /tmp/test-tag.sh
    Initialized empty Git repository in /tmp/test-git/.git/
    [master (root-commit) 9816756] README: testing content
     1 file changed, 1 insertion(+)
     create mode 100644 README
    Author: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
    [master 304b71e] README: testing content again
     1 file changed, 1 insertion(+), 1 deletion(-)
    Author: Test User <test@xxxxxxxxxxx>
    Author: Test User <test@xxxxxxxxxxx>
    Author: Test User <test@xxxxxxxxxxx>

I'd expect references to "Tag Test User <tagtest@xxxxxxxxxxx>" for the
second tag I created.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]