aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rwxr-xr-xgit-vc10
2 files changed, 11 insertions, 4 deletions
diff --git a/README.md b/README.md
index b129edb..f913f34 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,9 @@ git-obranch
git-oci
: prepare commit message from `*.changes` file
+git-vc
+: generate new record in *.changes file from the list of commits between the current and the last version of the SPEC file.
+
goscb
: (probably not needed, when the checkout is primed with `git-obranch`) run `osc build` without regards if `.osc/` directory exists
@@ -19,4 +22,4 @@ git-which-tag.sh
All issues, questions, complaints, or (even better!) patches
should be send via email to
[~mcepl/devel@lists.sr.ht](mailto:~mcepl/devel@lists.sr.ht) email
-list (for patches use [git send-email](https://git-send-email.io/)). \ No newline at end of file
+list (for patches use [git send-email](https://git-send-email.io/)).
diff --git a/git-vc b/git-vc
index 5876236..e75f10a 100755
--- a/git-vc
+++ b/git-vc
@@ -4,13 +4,17 @@ set -eu
EDITOR=${EDITOR:-vi}
REPO="$(basename "$(readlink -f .)")"
-BEFORE=$(git diff --color=never|awk -F. '/^-Version/ {print $NF}')
+if [ "$#" -gt 0 ] ; then
+ BEFORE="$1"
+else
+ BEFORE=$(git diff --color=never|awk -F. '/^-Version/ {print $NF}')
+fi
AFTER=$(git diff --color=never|awk -F. '/^+Version/ {print $NF}')
-[ -z "$BEFORE" -o -z "$AFTER" ] && exit 0
+[ -z "$BEFORE" ] || [ "$AFTER" ] && exit 0
cd "$REPO"
CHGLOG="$(git log --pretty='format: - %s' "$BEFORE..$AFTER")"
cd ..
osc vc -m "Update from $BEFORE to $AFTER:\n$CHGLOG"
-$EDITOR *.changes
+$EDITOR ./*.changes