Add git-cat-file-for-each-branch.sh and git-lfs-undo.sh in scripts/shell/job
This commit is contained in:
17
scripts/shell/job/git-cat-file-for-each-branch.sh
Executable file
17
scripts/shell/job/git-cat-file-for-each-branch.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
filename=$1
|
||||
repo_dir=`pwd`
|
||||
|
||||
for branch in $(git for-each-ref --format='%(refname)' refs/remotes/origin); do
|
||||
cmd_out=`git show $branch:$filename`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
cmd_out="[$branch] O arquivo \"$filename\" não existe no branch"
|
||||
else
|
||||
echo "[$branch] Arquivo:"
|
||||
echo "$cmd_out"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
done
|
||||
Reference in New Issue
Block a user