File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,22 @@ Help()
6262 echo " options:"
6363 echo " -c Specifies the company. Set to Oracle by default."
6464 echo " -y Specifies the copyright year. Set to current year by default."
65+ echo " -b Specifies the base reference for change set lookup."
6566 echo " -f Updates the copyright for all change sets in a given year,"
66- echo " as specified by -y."
67+ echo " as specified by -y. Overrides -b flag. "
6768 echo " -h Print this help."
6869 echo
6970}
7071
7172full_year=false
73+ base_reference=master
7274
7375# Process options
74- while getopts " c:fhy:" option; do
76+ while getopts " b: c:fhy:" option; do
7577 case $option in
78+ b) # supplied base reference
79+ base_reference=${OPTARG}
80+ ;;
7681 c) # supplied company year
7782 company=${OPTARG}
7883 ;;
111116 if [ " $full_year " = " true" ]; then
112117 vcs_list_changesets=(git log --no-merges --since=" ${year} -01-01T00:00:00Z" --until=" ${year} -12-31T23:59:59Z" --pretty=tformat:" %H" )
113118 else
114- vcs_list_changesets=(git log --no-merges ' master ..HEAD' --since=" ${year} -01-01T00:00:00Z" --until=" ${year} -12-31T23:59:59Z" --pretty=tformat:" %H" )
119+ vcs_list_changesets=(git log --no-merges " ${base_reference} ..HEAD" --since=" ${year} -01-01T00:00:00Z" --until=" ${year} -12-31T23:59:59Z" --pretty=tformat:" %H" )
115120 fi
116121 vcs_changeset_message=(git log -1 --pretty=tformat:" %B" ) # followed by ${changeset}
117122 vcs_changeset_files=(git diff-tree --no-commit-id --name-only -r) # followed by ${changeset}
You can’t perform that action at this time.
0 commit comments