Skip to content

Commit

Permalink
add option to specifiy which branch to check
Browse files Browse the repository at this point in the history
  • Loading branch information
FarisZR committed Dec 25, 2023
1 parent 9ca19c5 commit 6d9f808
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions remote-check.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# $1=git link $2 = local hash file $3 remote/file that contains the hash in the repo $4 output name
git ls-remote $1 HEAD > $2
# $1=git link, $2=local hash file, $3=remote/file that contains the hash in the repo, $4=output name, $5(optional)=branch
BRANCH=${5:-HEAD} # Set BRANCH to $5 if provided, else default to HEAD

git ls-remote $1 $BRANCH > $2

local="$2"
remote="$3"
Expand Down

0 comments on commit 6d9f808

Please sign in to comment.