[petsc-dev] git script for finding "outdated" branches in next

Smith, Barry F. bsmith at mcs.anl.gov
Fri Jan 11 16:55:47 CST 2019


   Jed gave me this git script to find branches in next that have not yet been merged to master

alias gitmasternotupdated="comm -12 <(git branch -r --merged origin/next | grep origin/ | sort) <(git branch -r --no-merged origin/master ) | xargs -n1 git log -1 --format='%Cgreen%ci %C(yellow)%d%Creset %s' --abbrev-commit |  sed 's?origin/[a-z/-]*, ??g' | grep -v '(origin/next)' | cut -b 1-`stty size | cut -d" " -f 2` | sort -u | grep -v Merge" 

Unfortunately it does not list branches in next that have had additional commits added to them (by someone fixing problems seen in nightly tests) since they were merged to next. Hence they can be "lost" branches that we forget to merge into next again for another round of testing.

   Could someone cook up a script that captures these branches? That is, it shows branches in next that are not master but have been updated since they were merged into next.

   Thanks

    Barry
 


More information about the petsc-dev mailing list