From b63a2d5a69837da3ea59cbc451b4e152582ef2b5 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 18 Apr 2016 19:11:52 -0700 Subject: Add commit script to generate commit history This will make it easier for users to merge changes into their trees. --- scripts/commit.rc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/commit.rc (limited to 'scripts') diff --git a/scripts/commit.rc b/scripts/commit.rc new file mode 100644 index 00000000..21789d72 --- /dev/null +++ b/scripts/commit.rc @@ -0,0 +1,18 @@ +#!/bin/rc + +flag e + + +repo=$1 +branch=$2 +tag=$3 + +fn checkstatus {} + +cd $repo + +if([ -f refs/heads/$branch ]) parent=(-p $branch) +if not parent=() + +ifs=() { message='oasis built by '`{id -un | head -c -1} } +commit=`{echo $message | git commit-tree $tag $parent} ; checkstatus +git update-ref refs/heads/$branch $commit -- cgit v1.2.3