X-Git-Url: https://git.wh0rd.org/?p=home.git;a=blobdiff_plain;f=.bin%2Fgit-rb-all;h=ef3f54c773596eb17cf39607052b1392f2f947e5;hp=0323d73ba451152045011412be816ad25a60fd36;hb=fa1a0920fe3009bd92dc6872e265588b998b4d19;hpb=53756ed8612888ef97a5c39a83e9ceaaed56ac91 diff --git a/.bin/git-rb-all b/.bin/git-rb-all index 0323d73..ef3f54c 100755 --- a/.bin/git-rb-all +++ b/.bin/git-rb-all @@ -28,6 +28,9 @@ main() { usage fi + # Switch to the top dir in case the working dir doesn't exist in every branch. + cd "$(git rev-parse --show-toplevel)" || return + local orig b branches orig=$(git rev-parse --abbrev-ref HEAD) || return