Example #1
0
    def signoff(self):
        try:
            import pwd
            user = pwd.getpwuid(os.getuid()).pw_name
        except ImportError:
            user = os.getenv('USER', N_('unknown'))

        name = _config.get('user.name', user)
        email = _config.get('user.email', '%s@%s' % (user, core.node()))
        return '\nSigned-off-by: %s <%s>' % (name, email)
Example #2
0
    def signoff(self):
        try:
            import pwd
            user = pwd.getpwuid(os.getuid()).pw_name
        except ImportError:
            user = os.getenv('USER', N_('unknown'))

        name = _config.get('user.name', user)
        email = _config.get('user.email', '%s@%s' % (user, core.node()))
        return '\nSigned-off-by: %s <%s>' % (name, email)
Example #3
0
    def signoff(self):
        try:
            import pwd

            user = pwd.getpwuid(os.getuid()).pw_name
        except ImportError:
            user = os.getenv("USER", N_("unknown"))

        cfg = gitcfg.current()
        name = cfg.get("user.name", user)
        email = cfg.get("user.email", "%s@%s" % (user, core.node()))
        return "\nSigned-off-by: %s <%s>" % (name, email)