aboutsummaryrefslogtreecommitdiffstats
path: root/ttcn3-sip-test/Dockerfile
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-05-07 10:01:16 +0200
committerOliver Smith <osmith@sysmocom.de>2019-05-07 10:24:52 +0200
commit26565bb729549152ce8fa89f59df02f37c907c27 (patch)
tree9be09b443e0142b7c8c6900d81b10a128e995b74 /ttcn3-sip-test/Dockerfile
parent269331461a2ff23a6c5e10a239075377de605aed (diff)
Simplify git checkout, allow branches and commits
Replace the following statements: a) "git checkout -f -B $BRANCH origin/$BRANCH" b) "git checkout -f -B $BRANCH $BRANCH" with: c) "git checkout -f $BRANCH" Regarding a), we don't need to specify 'origin/' for each branch, since we are cloning the repositories in the same Dockerfile, and therefore we know for sure that there is only one remote and branch names won't be ambiguous. Removing the 'origin/' allows to put commit hashes into the branch variables (like done in the new bisect script [1]). Version b) does not work with branch names: $ git checkout -f -B osmith/check-imei-before-lu osmith/check-imei-before-lu fatal: Cannot update paths and switch to branch 'osmith/check-imei-before-lu' at the same time. Did you intend to checkout 'osmith/check-imei-before-lu' which can not be resolved as commit? New version c) works with both commits and branches, and it is shorter. [1] Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f Change-Id: I2ff745c8d19b777d876170d5717c082ceb68a1f3
Diffstat (limited to 'ttcn3-sip-test/Dockerfile')
-rw-r--r--ttcn3-sip-test/Dockerfile4
1 files changed, 2 insertions, 2 deletions
diff --git a/ttcn3-sip-test/Dockerfile b/ttcn3-sip-test/Dockerfile
index eead347..4ba59be 100644
--- a/ttcn3-sip-test/Dockerfile
+++ b/ttcn3-sip-test/Dockerfile
@@ -5,7 +5,7 @@ RUN mkdir /root/projects && (cd /root/projects && ln -sf / git)
RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git
RUN cd osmo-ttcn3-hacks && \
- git checkout -f -B master origin/master && \
+ git checkout -f master && \
make deps
RUN git config --global user.email docker@dock.er && \
@@ -16,7 +16,7 @@ ARG OSMO_TTCN3_BRANCH="master"
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
RUN cd osmo-ttcn3-hacks && \
git fetch && \
- git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
+ git checkout -f $OSMO_TTCN3_BRANCH && \
git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \
make sip