$ gitlog -----------------------[ recovery25 ]----------------------- (snip) 11340d27a33895 Bob Peterson gfs2: drain the ail2 list after io errors 109b3c4e6efb10 Bob Peterson gfs2: clean up iopen glock mess in gfs2_create_inode 9 d2e8c22be39b Bob Peterson gfs2: Do proper error checking for go_sync family of glops 89563e31f8bfd Christoph Hellwig gfs2: use page_offset in gfs2_page_mkwrite 7 ebac7a38036c Christoph Hellwig gfs2: don'tuse buffer_heads in gfs2_allocate_page_backing 6 f703a3c27874 Andreas Gruenbacher gfs2: Improve mmap write vs. punch_hole consistency 5 a3e86d2ef30e Andreas Gruenbacher gfs2: Multi-block allocations in gfs2_page_mkwrite 4 da3c604755b0 Andreas Gruenbacher gfs2: Fix end-of-file handling in gfs2_page_mkwrite 34525c2f5b46f Bob Peterson Rafael Aquini's slab instrumentation 2 a06a5b7dea02 Bob Peterson GFS2: Add go_get_holdtime to gl_ops ^ 8ba93c796d5c Bob Peterson gfs2: introduce newfunction remaining_hold_time anduse it in dq H e8b5ff851bb9 Bob Peterson gfs2: Allow rgrps to have a minimum hold time
$ gitlog.grep inode_go_sync -----------------------[ recovery25 -50 patches ]----------------------- (snip) 11340d27a33895 Bob Peterson gfs2: drain the ail2 list after io errors 109b3c4e6efb10 Bob Peterson gfs2: clean up iopen glock mess in gfs2_create_inode 9 d2e8c22be39b Bob Peterson gfs2: Do proper error checking for go_sync family of glops 152:-staticvoid inode_go_sync(struct gfs2_glock *gl) 153:+static int inode_go_sync(struct gfs2_glock *gl) 163:@@-296,6+302,7@@staticvoid inode_go_sync(struct gfs2_glock *gl) 89563e31f8bfd Christoph Hellwig gfs2:use page_offset in gfs2_page_mkwrite 7 ebac7a38036c Christoph Hellwig gfs2: don't use buffer_heads in gfs2_allocate_page_backing 6 f703a3c27874 Andreas Gruenbacher gfs2: Improve mmap write vs. punch_hole consistency 5 a3e86d2ef30e Andreas Gruenbacher gfs2: Multi-block allocations in gfs2_page_mkwrite 4 da3c604755b0 Andreas Gruenbacher gfs2: Fix end-of-file handling in gfs2_page_mkwrite 34525c2f5b46f Bob Peterson Rafael Aquini's slab instrumentation 2 a06a5b7dea02 Bob Peterson GFS2: Add go_get_holdtime to gl_ops ^8ba93c796d5c Bob Peterson gfs2: introduce newfunction remaining_hold_time anduse it in dq H e8b5ff851bb9 Bob Peterson gfs2: Allow rgrps to have a minimum hold time
因此,现在我知道补丁 HEAD~9 是需要修复的补丁。我使用 git rebase -i HEAD~10 编辑补丁 9,git commit -a --amend,然后 git rebase --continue 以进行必要的调整。
5、gitbranchcmp3
gitbranchcmp3 使我可以将当前分支与另一个分支进行比较,因此我可以将较旧版本的补丁与我的较新版本进行比较,并快速查看已更改和未更改的内容。它生成一个比较脚本(使用了 KDE 工具 Kompare,该工具也可在 GNOME3 上使用)以比较不太相同的补丁。如果除行号外没有其他差异,则打印 [SAME]。如果仅存在注释差异,则打印 [same](小写)。例如:
$ gitbranchcmp3 recovery24 Branch recovery24 has 47 patches Branch recovery25 has 50 patches
(snip) 3887eb6901607a 340d27a33895 [same] gfs2: drain the ail2 list after io errors 3990fefb577a26 9b3c4e6efb10 [same] gfs2: clean up iopen glock mess in gfs2_create_inode 40 ba3ae06b8b0e d2e8c22be39b [same] gfs2: Do proper error checking for go_sync family of glops 412ab662294329 9563e31f8bfd [SAME] gfs2: use page_offset in gfs2_page_mkwrite 420adc6d817b7a ebac7a38036c [SAME] gfs2: don'tuse buffer_heads in gfs2_allocate_page_backing 4355ef1f8d0be8 f703a3c27874 [SAME] gfs2: Improve mmap write vs. punch_hole consistency 44 de57c2f72570 a3e86d2ef30e [SAME] gfs2: Multi-block allocations in gfs2_page_mkwrite 457c5305fbd68a da3c604755b0 [SAME] gfs2: Fix end-of-file handling in gfs2_page_mkwrite 461625240051514525c2f5b46f [SAME] Rafael Aquini's slab instrumentation 47 a06a5b7dea02 [ ] GFS2: Add go_get_holdtime to gl_ops 488ba93c796d5c [ ] gfs2: introduce newfunction remaining_hold_time anduse it in dq 49 e8b5ff851bb9 [ ] gfs2: Allow rgrps to have a minimum hold time
Missing from recovery25: The missing: Compare script generated at: /tmp/compare_mismatches.sh
$ gitlog.find -----------------------[ recovery25 - 50 patches ]----------------------- (snip) 11340d27a33895 Bob Peterson gfs2: drain the ail2 list after io errors lo 5bcb9be74b2a Bob Peterson gfs2: drain the ail2 list after io errors 109b3c4e6efb10 Bob Peterson gfs2: clean up iopen glock mess in gfs2_create_inode fn 2c47c1be51fb Bob Peterson gfs2: clean up iopen glock mess in gfs2_create_inode 9 d2e8c22be39b Bob Peterson gfs2: Do proper error checking for go_sync family of glops lo feb7ea639472 Bob Peterson gfs2: Do proper error checking for go_sync family of glops 89563e31f8bfd Christoph Hellwig gfs2: use page_offset in gfs2_page_mkwrite ms f3915f83e84c Christoph Hellwig gfs2: use page_offset in gfs2_page_mkwrite 7 ebac7a38036c Christoph Hellwig gfs2: don'tuse buffer_heads in gfs2_allocate_page_backing ms 35af80aef99b Christoph Hellwig gfs2: don'tuse buffer_heads in gfs2_allocate_page_backing 6 f703a3c27874 Andreas Gruenbacher gfs2: Improve mmap write vs. punch_hole consistency fn 39c3a948ecf6 Andreas Gruenbacher gfs2: Improve mmap write vs. punch_hole consistency 5 a3e86d2ef30e Andreas Gruenbacher gfs2: Multi-block allocations in gfs2_page_mkwrite fn f53056c43063 Andreas Gruenbacher gfs2: Multi-block allocations in gfs2_page_mkwrite 4 da3c604755b0 Andreas Gruenbacher gfs2: Fix end-of-file handling in gfs2_page_mkwrite fn 184b4e60853d Andreas Gruenbacher gfs2: Fix end-of-file handling in gfs2_page_mkwrite 34525c2f5b46f Bob Peterson Rafael Aquini's slab instrumentation Not found upstream 2 a06a5b7dea02 Bob Peterson GFS2: Add go_get_holdtime to gl_ops Not found upstream ^ 8ba93c796d5c Bob Peterson gfs2: introduce newfunction remaining_hold_time anduse it in dq Not found upstream H e8b5ff851bb9 Bob Peterson gfs2: Allow rgrps to have a minimum hold time Not found upstream Compare script generated: /tmp/compare_upstream.sh
#echo "old: " $oldsha1s oldcount=${#oldsha1s[@]} echo"Branch $oldbranch has $oldcount patches" oldcount=$(echo$oldcount - 1 | bc) #for o in `seq 0 ${#oldsha1s[@]}`; do # echo -n ${oldsha1s[$o]} " " # desc=`git show $i | head -5 | tail -1|cut -b5-` #done
#echo "new: " $newsha1s newcount=${#newsha1s[@]} echo"Branch $newbranch has $newcount patches" newcount=$(echo$newcount - 1 | bc) #for o in `seq 0 ${#newsha1s[@]}`; do # echo -n ${newsha1s[$o]} " " # desc=`git show $i | head -5 | tail -1|cut -b5-` #done echo
for new in `seq 0 $newcount`; do newsha=${newsha1s[$new]} newdesc=`git show $newsha | head -5 | tail -1|cut -b5-` oldsha=" " same="[ ]" for old in `seq 0 $oldcount`; do iftest"${oldsha1s[$old]}" = "match"; then continue; fi olddesc=`git show ${oldsha1s[$old]} | head -5 | tail -1|cut -b5-` iftest"$olddesc" = "$newdesc" ; then oldsha=${oldsha1s[$old]} #echo $oldsha git show $oldsha |tail -n +2 |grep -v "index.*\.\." |grep -v "@@" > /tmp/gronk1 git show $newsha |tail -n +2 |grep -v "index.*\.\." |grep -v "@@" > /tmp/gronk2 diff /tmp/gronk1 /tmp/gronk2 &> /dev/null if [ $? -eq 0 ] ;then # No differences same="[SAME]" oldsha1s[$old]="match" break fi git show $oldsha |sed -n '/diff/,$p' |grep -v "index.*\.\." |grep -v "@@" > /tmp/gronk1 git show $newsha |sed -n '/diff/,$p' |grep -v "index.*\.\." |grep -v "@@" > /tmp/gronk2 diff /tmp/gronk1 /tmp/gronk2 &> /dev/null if [ $? -eq 0 ] ;then # Differences in comments only same="[same]" oldsha1s[$old]="match" break fi oldsha1s[$old]="match" echo"compare_them $oldsha$newsha" >> $script fi done echo"$new$oldsha$newsha$same$newdesc" done
echo echo"Missing from $newbranch:" the_missing="" # Now run through the olds we haven't matched up for old in `seq 0 $oldcount`; do iftest${oldsha1s[$old]} != "match"; then olddesc=`git show ${oldsha1s[$old]} | head -5 | tail -1|cut -b5-` echo"${oldsha1s[$old]}$olddesc" the_missing=`echo"$the_missing${oldsha1s[$old]}"` fi done