Page MenuHomeDevCentral

D3959.id10258.diff
No OneTemporary

D3959.id10258.diff

diff --git a/roles/devserver/userland-home/files/dereckson/bin/arc-paste-file b/roles/devserver/userland-home/files/dereckson/bin/arc-paste-file
--- a/roles/devserver/userland-home/files/dereckson/bin/arc-paste-file
+++ b/roles/devserver/userland-home/files/dereckson/bin/arc-paste-file
@@ -13,4 +13,4 @@
exit 2
fi
-arc paste --title $FILE < $FILE
+arc paste --title $FILE -- < $FILE
diff --git a/roles/devserver/userland-home/files/dereckson/bin/arc-update-repo b/roles/devserver/userland-home/files/dereckson/bin/arc-update-repo
--- a/roles/devserver/userland-home/files/dereckson/bin/arc-update-repo
+++ b/roles/devserver/userland-home/files/dereckson/bin/arc-update-repo
@@ -19,4 +19,4 @@
exit
fi
-echo "{ \"callsigns\": [$CALLSIGN] }" | arc call-conduit diffusion.looksoon > /dev/null
+echo "{ \"callsigns\": [$CALLSIGN] }" | arc call-conduit diffusion.looksoon -- > /dev/null
diff --git a/roles/devserver/userland-home/files/dereckson/bin/git-bye b/roles/devserver/userland-home/files/dereckson/bin/git-bye
--- a/roles/devserver/userland-home/files/dereckson/bin/git-bye
+++ b/roles/devserver/userland-home/files/dereckson/bin/git-bye
@@ -1,14 +1,17 @@
#!/bin/sh
-BRANCH=$(git rev-parse --abbrev-ref HEAD)
+CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+DEFAULT_BRANCH=$(git get-default-branch)
-if [ "$BRANCH" = "master" ]; then
- echo "You're already on the master branch."
+if [ "$CURRENT_BRANCH" = "$DEFAULT_BRANCH" ]; then
+ echo "You're already on the default branch '$DEFAULT_BRANCH'."
exit 1
fi
# Updates master branch if there isn't any staged change and working tree is clean
-git checkout master
-git diff-index --quiet --cached HEAD -- && git diff-files --quiet && git pull
+git checkout "$DEFAULT_BRANCH"
-git branch -D "$BRANCH"
+git diff-index --quiet --cached HEAD -- && \
+git diff-files --quiet && git pull
+
+git branch -D "$CURRENT_BRANCH"
diff --git a/roles/devserver/userland-home/files/dereckson/bin/git-newbug b/roles/devserver/userland-home/files/dereckson/bin/git-newbug
--- a/roles/devserver/userland-home/files/dereckson/bin/git-newbug
+++ b/roles/devserver/userland-home/files/dereckson/bin/git-newbug
@@ -5,27 +5,10 @@
exit 1
fi
-BRANCH=$1
+WORKING_BRANCH=$1
+DEFAULT_BRANCH=$(git get-default-branch)
-REPO=$(git rev-parse --show-toplevel)
-REPO_RETCODE=$?
-
-if [ $REPO_RETCODE -ne 0 ]
-then
- exit $REPO_RETCODE
-fi;
-
-REPO=$(basename "$REPO")
-
-if [ "$REPO" = "puppet" ]
-then
- MASTER=production
-else
- MASTER=master
-fi
-
-git checkout $MASTER
+git switch "$DEFAULT_BRANCH"
git fetch --all
-git pull
-git pull origin $MASTER
-git checkout -b "$BRANCH"
+git pull origin "$DEFAULT_BRANCH"
+git switch -c "$WORKING_BRANCH"
diff --git a/roles/devserver/userland-home/files/dereckson/bin/git-respawn b/roles/devserver/userland-home/files/dereckson/bin/git-respawn
--- a/roles/devserver/userland-home/files/dereckson/bin/git-respawn
+++ b/roles/devserver/userland-home/files/dereckson/bin/git-respawn
@@ -1,19 +1,20 @@
#!/usr/bin/env bash
-BRANCH=$(git rev-parse --abbrev-ref HEAD)
+CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+DEFAULT_BRANCH=$(git get-default-branch)
-if [ "$BRANCH" = "master" ]; then
- echo "You're already on the master branch."
- exit 1
+if [ "$CURRENT_BRANCH" = "$DEFAULT_BRANCH" ]; then
+ echo "You're on the default branch '$DEFAULT_BRANCH'. This feature is intended for feature branches."
+ exit 1
fi
-# Updates master branch if there isn't any staged change and working tree is clean
-git checkout master
+# Updates default branch if there isn't any staged change and working tree is clean
+git checkout "$DEFAULT_BRANCH"
git diff-index --quiet --cached HEAD -- && git diff-files --quiet && git pull
git branch -D "$BRANCH"
# Fetch new branch
-if [ ${BRANCH:0:10} = "arcpatch-D" ]; then
- arc patch ${BRANCH:9}
+if [ ${CURRENT_BRANCH:0:10} = "arcpatch-D" ]; then
+ arc patch ${CURRENT_BRANCH:9}
fi

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 17, 01:07 (18 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3632787
Default Alt Text
D3959.id10258.diff (3 KB)

Event Timeline