git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Who uses Signed-off-by and DCO?

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jun 12, 2009, 19:18 UTC
Message-ID
<zcwHUAotNPBrTDFNEkfJbIprL0vwx_PJ65xUGwV0moW81e1bhyxgMg@cipher.nrlssc.navy.mil>
In-Reply-To
<1244818580-sup-60@ntdws12.chass.utoronto.ca>
Ben Walton wrote:
Show 40 quoted lines
> Excerpts from Jeff King's message of Fri Jun 12 10:48:57 -0400 2009:
>> [any reason not to keep this on the git list?]
> 
> ...no, I just forget to set the CC.
> 
>> On Fri, Jun 12, 2009 at 10:36:46AM -0400, Ben Walton wrote:
>>
>>> I've aliased 'ci' to 'commit -s', and people either use the alias or
>>> are encouraged to add the -s (it is by convention only, after all).
>>> We've then setup the root shell such that $USER is leveraged to source
>>> in some personalized shell when su is used.  This is where we set
>>> GIT_COMMITTER_* on a per-admin basis.  People not doing that edit the
>>> SoB line while editing the commit message...this fails with 'ci -m'.
>> Makes sense. I have a similar setup where people could be identified by
>> the ssh keys they use to log in, but I have never gotten around to
>> setting up something automated.
>>
>> I suspect SoB may be more convenient than GIT_AUTHOR_* in your scenario
>> just because you can tweak the former in the editor, as you note (and it
>> sounds like it's possible to not have the other variables set up
>> properly in your setup).
> 
> It is easier from that perspective, but since nothing is forcing the
> use of -s, we'd have the same compliance if we wanted to ask people to
> use --author (or set the proper environment).
> 
>>> Actually, I'm still wavering on which I'd prefer.  At this point,
>>> since git is still fairly new for us in this capacity, we're feeling
>>> our way through things.  I went with COMMITTER instead of AUTHOR
>>> though since that tends to stand out more in `git log` (at least to my
>>> eyes).  Since we're not a finger pointing group :), things like `git
>> I would argue that you should do the opposite. AUTHOR is really about
>> "who wrote this change" and COMMITTER is about "who put this change into
>> the repo". So to me, "Bob wrote the change, logged in as root@box2, and
>> committed" should be AUTHOR=Bob, COMMITTER=root@box2.
> 
> Your described usage is more semantically correct.  It may make sense
> for us to switch to AUTHOR, so that in the future we could pinpoint
> changes with less hassle.  I'll be discussing this with my colleagues
> shortly.

We use a shared account for updating a specific git repository. I have this bit of shell in the .bash_profile of that account to automatically prompt and set GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL when someone tries "git commit':

_setup_git_ident ()
{
   local userid
   local ypentry
   while read -p "Your Real Login ID (not \"$LOGNAME\")> " userid
   do
       ypentry=$(ypmatch "$userid" passwd) || continue
       break
   done
   oldIFS=$IFS
   IFS=:
   set -- $ypentry
   IFS=$oldIFS
   GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-"$5"}
   GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-"$1@"$(dnsdomainname)}
   export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
}
_run_git ()
{
   if [ "x$1" = "xcommit" ] &&
      [ -z "$GIT_AUTHOR_NAME" -o -z "$GIT_AUTHOR_EMAIL" ]
   then
       _setup_git_ident
   fi
   git "$@"
}
alias git=_run_git
Previous: Ben Walton
Message 13 of 13 in “Who uses Signed-off-by and DCO?”
  1. Nanako ShiraishiJun 11, 2009
  2. Andreas EricssonJun 12, 2009
  3. Ben WaltonJun 12, 2009
  4. Jeff KingJun 12, 2009
  5. Jacob HelwigJun 12, 2009
  6. Scott ChaconJun 12, 2009
  7. Theodore TsoJun 12, 2009
  8. Junio C HamanoJun 13, 2009
  9. Theodore TsoJun 13, 2009
  10. Uwe Kleine-KönigJun 13, 2009
  11. David AguilarJun 14, 2009
  12. Ben WaltonJun 12, 2009
  13. Brandon CaseyJun 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.