File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -228,10 +228,19 @@ compare_git()
228228 subj=${hashsubj: 40}
229229 downhash=${hashsubj: 0: 40}
230230 # A little bit hackish, but find the match by looking at upstream
231- # subject lines, and using the last one. Not all backports contain
231+ # subject lines, and using the newest one. Not all backports contain
232232 # the phrase "cherry-pick", so we can't really try and find the
233233 # upstream hash from that...
234- uphash=` git log $upstream --pretty=format:" %H" --fixed-strings --grep=" ${subj} " | tail -n 1`
234+ uphash=" "
235+ while read uphashsubj
236+ do
237+ if [[ " ${uphashsubj: 40} " == " $subj " ]]
238+ then
239+ uphash=${uphashsubj: 0: 40}
240+ break
241+ fi
242+ done < <( git log $upstream --pretty=tformat:" %H%s" --fixed-strings --grep=" ${subj} " )
243+
235244 if [[ -n " $uphash " ]]
236245 then
237246 numdiff=` diff -u <( git diff $uphash ^! | egrep ^[-+]) \
You can’t perform that action at this time.
0 commit comments