Stafford Horne <sho...@gmail.com> writes:

> Hello,
>
> On Wed, Jul 4, 2018, 7:34 AM Philippe Mathieu-Daudé <f4...@amsat.org> wrote:
>
>> Hi Stafford,
>>
>> On 07/02/2018 12:10 PM, Stafford Horne wrote:
>> > From: Richard Henderson <richard.hender...@linaro.org>
<snip>
>
> Sorry, I brought these in from Richards tree and saw them but thought it
> was fine to keep the annotations.
>
> I'll remove them from patches in the future.
>
> Richard, how do you usually remove these before your pr?  I suppose you
> have some kind of script?
>

For reference these are my exact-steps:

  We need to ensure we have added our signoff and there is no ---
  ephemera left from commit history.

  ,----
  | errors=0
  | commits=0
  | while read rev; do
  |     author=$(git show -s --format='%an <%ae>' $rev)
  |     body=$(git show -s --format='%B' $rev)
  |
  |     # Check for Author signoff
  |     if ! grep -q "^Signed-off-by: $author" <<< "$body"; then
  |         errors=$((errors+1))
  |         echo "$rev missing signoff by $author"
  |     fi
  |
  |     # Check for my signoff
  |     if ! grep -q "^Signed-off-by: $signoff" <<< "$body"; then
  |         errors=$((errors+1))
  |         echo "$rev missing your signoff ($signoff)"
  |     fi
  |
  |     # Check for stray history
  |     if grep -q "^--" <<< "$body"; then
  |         errors=$((errors+1))
  |         echo "$rev may have history in it"
  |     fi
  |
  |     commits=$((commits+1))
  | done < <(git rev-list "origin/master..HEAD")
  |
  | echo "Found $errors errors over $commits commits"
  `----

  If we want to strip history we can run the following:

  ,----
  | current=$(git rev-parse --abbrev-ref HEAD)
  | if [ -d "${series}.pull" ]; then
  |   rm -rf ${series}.pull
  | fi
  | git format-patch origin/master..${current} -p -o ${series}.pull
  | prb=${current}-pr
  | echo ${prb}
  | git checkout -b ${prb} origin/master
  | git am ${series}.pull/*
  | rm -rf ${series}.pull
  `----

--
Alex Bennée

Reply via email to