Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/aur/drop-from-repo.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-04-21 10:18:55 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-04-21 10:18:55 +0200
commit2dc7a161a09518edae9e04a77fca569460d6a560 (patch)
tree5c893311826fc1ae7090352fb2f17a2d3d3a560e /src/lib/aur/drop-from-repo.sh
parenta1ca197bc99c2d5c2977630cc4c9dbfd5461d9c1 (diff)
parent05bea3e922aa7aec5cba3242d3f34b5c10fad24e (diff)
merged with upstream
Diffstat (limited to 'src/lib/aur/drop-from-repo.sh')
-rw-r--r--src/lib/aur/drop-from-repo.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/aur/drop-from-repo.sh b/src/lib/aur/drop-from-repo.sh
index 6ebe12a..0e9cab4 100644
--- a/src/lib/aur/drop-from-repo.sh
+++ b/src/lib/aur/drop-from-repo.sh
@@ -92,14 +92,19 @@ pkgctl_aur_drop_from_repo() {
fi
for path in "${paths[@]}"; do
- if ! realpath=$(realpath -e "${path}"); then
+ # resolve symlink for basename
+ if ! realpath=$(realpath --canonicalize-existing -- "${path}"); then
die "No such directory: ${path}"
fi
+ # skip paths that are not directories
+ if [[ ! -d "${realpath}" ]]; then
+ continue
+ fi
pkgbase=$(basename "${realpath}")
pkgbase=${pkgbase%.git}
- if [[ ! -d "${path}/.git" ]]; then
+ if [[ ! -d "${realpath}/.git" ]]; then
die "Not a Git repository: ${path}"
fi
@@ -136,9 +141,9 @@ pkgctl_aur_drop_from_repo() {
if (( FORCE )); then
AUR_OVERWRITE=1 \
GIT_SSH_COMMAND="ssh -o SendEnv=AUR_OVERWRITE" \
- git push --force origin master
+ git push --force --no-follow-tags origin master
else
- git push origin master
+ git push --no-follow-tags origin master
fi
# update the local default branch in case this clone is used in the future