diff options
| author | Michael Forney <mforney@mforney.org> | 2016-07-15 19:17:48 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-07-16 14:23:20 -0700 |
| commit | 78c4cc0023cd0e9e6df03a07f396017da48e336c (patch) | |
| tree | 1d1e77577e197608136d9867e16ca1bbd2cdec7e /scripts | |
| parent | b6392fac15793878df45a57d049a063b4e781e2c (diff) | |
Don't list git repository files as outputs
This way, ninja -t clean will work as expected.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/commit.rc | 3 | ||||
| -rw-r--r-- | scripts/tree.rc | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/scripts/commit.rc b/scripts/commit.rc index feb0f4ac..e7b5d468 100644 --- a/scripts/commit.rc +++ b/scripts/commit.rc @@ -5,9 +5,11 @@ flag e + repo=$1 branch=$2 tag=$3 +out=$4 fn checkstatus {} +wd=`{pwd} cd $repo if([ -f refs/heads/$branch ]) parent=(-p $branch) @@ -16,3 +18,4 @@ if not parent=() message='oasis built by '`{id -un} commit=`{echo $message | git commit-tree $tag $parent} ; checkstatus git update-ref refs/heads/$branch $commit +ln -f refs/heads/$branch $wd/$out diff --git a/scripts/tree.rc b/scripts/tree.rc index d42f5bd6..81f641c6 100644 --- a/scripts/tree.rc +++ b/scripts/tree.rc @@ -5,13 +5,15 @@ flag e + repo=$1 tag=$2 index=$3 +out=$4 fn checkstatus {} -oldcwd=`{pwd} +wd=`{pwd} cd $repo git read-tree --empty -git update-index --index-info <$oldcwd/$index +git update-index --index-info <$wd/$index tree=`{git write-tree} ; checkstatus git update-ref refs/tags/$tag $tree +ln -f refs/tags/$tag $wd/$out |
