3 #=======================================================================
5 # File ID: ff8df730-a2ed-11e5-9f07-fefdb24f8e10
7 # Disable automatic push from git-annex to a Git remote
9 # Author: Øyvind A. Holm <sunny@sunbase.org>
10 # License: GNU General Public License version 2 or later.
11 #=======================================================================
13 progname
=ga-ignore-remote
27 " -n "$progname" -- "$@
")"
28 test "$?" = "0" ||
exit 1
36 -h|
--help) opt_help
=1; shift ;;
37 -q|
--quiet) opt_quiet
=$
(($opt_quiet + 1)); shift ;;
38 -u|
--unignore) opt_unignore
=$
(($opt_quiet + 1)); shift ;;
39 -v|
--verbose) opt_verbose
=$
(($opt_verbose + 1)); shift ;;
40 --version) echo $progname $VERSION; exit 0 ;;
42 *) echo $progname: Internal error
>&2; exit 1 ;;
45 opt_verbose
=$
(($opt_verbose - $opt_quiet))
47 if test "$opt_help" = "1"; then
48 test $opt_verbose -gt 0 && { echo; echo $progname $VERSION; }
51 Disable automatic push from git-annex to a Git remote
53 Usage: $progname [options] REMOTE [REMOTES ...]
60 Be more quiet. Can be repeated to increase silence.
62 Enable push to the remotes, remove the annex-readonly value from Git
65 Increase level of verbosity. Can be repeated.
67 Print version information.
76 if test -z "$(git remote | grep "^
$remote\$
")"; then
77 echo $progname: $remote: Git remote not found
>&2
81 if test "$opt_unignore" = "1"; then
82 git config
--unset remote.
$remote.annex-readonly
84 git config remote.
$remote.annex-readonly true
87 if test $opt_verbose -ge 0; then
88 git config
-l |
grep ^remote.
$remote.annex