One: [Wiki] Update ONE-DCO Signed-off-by signature

Created on 27 May 2020  路  3Comments  路  Source: Samsung/ONE

We need to update the Signed-off signature as below format:

ONE-DCO-1.0-Signed-off-by: NAME <EMAIL>

Details are available in Wiki here.
However instructions might be little confusing for a beginner and script should include one more scenario: if already Signed-off-by signature is present in the commit message.

So I have configured the bash script for my system (using git bash as of now) as below:

else part is added

#!/usr/bin/env bash

COMMIT_MSG_FILE=$1
NAME=$(git config user.name)
EMAIL=$(git config user.email)

if ! grep "Signed-off-by:" ${COMMIT_MSG_FILE}; then
  echo -e "\n\nONE-DCO-1.0-Signed-off-by: $NAME <$EMAIL>" >> ${COMMIT_MSG_FILE}
else
  sed -i 's/^Signed-off-by/ONE-DCO-1.0-Signed-off-by/g' ${COMMIT_MSG_FILE}
fi

Based on others' opinion, the changes can be updated in wiki.

/cc @lemmaa

typdiscussion

Most helpful comment

FYI, I just use below script(It's just an Information for people who use commands like me)

#!/usr/bin/env bash

sed -i s/Signed-off-by/ONE-DCO-1.0-Signed-off-by/g $1

First, since I use git commit -v command, wiki script doesn't work well for me. And, since we do squash merge, if there are lots of commit, sign-off is added for each commit. Only first commit adds sign-off by git commit -s command. It would be better to add sign-off only once I think. It's just my preference though:)

All 3 comments

Agree, as I commented https://github.com/Samsung/ONE/pull/775#issuecomment-634681859 . Thank you!


By the way, It seems like a good way to leave an issue like this for a Wiki fix. You don't have to do this in all cases, but if you need opinions from multiple people, I would like to proceed like this. This is because the wiki does not have a function to notify us of the change.

Thank you @kishcs for the good practice! :)

/cc @Samsung/nnfw , @Samsung/nncc

FYI, I just use below script(It's just an Information for people who use commands like me)

#!/usr/bin/env bash

sed -i s/Signed-off-by/ONE-DCO-1.0-Signed-off-by/g $1

First, since I use git commit -v command, wiki script doesn't work well for me. And, since we do squash merge, if there are lots of commit, sign-off is added for each commit. Only first commit adds sign-off by git commit -s command. It would be better to add sign-off only once I think. It's just my preference though:)

I always use git commit -s, so for all the commits it adds signed-off signature. Not aware of squash merge :( (novice in git )

Was this page helpful?
0 / 5 - 0 ratings