3 #=======================================================================
5 # File ID: 1fc79a40-015b-11e5-a869-f13c8f9a2603
7 # Fix broken symlinks for new files from the last month (can be
8 # overridden) in git-annex. Useful when moving lots of files around and
9 # committing with --no-verify (or disabling the automatic symlink fixing
10 # in .git/hooks/pre-commit) to properly record file moves in Git.
12 # Author: Øyvind A. Holm <sunny@sunbase.org>
13 # License: GNU General Public License version 2 or later.
14 #=======================================================================
28 " -n "$progname" -- "$@
")"
29 test "$?" = "0" ||
exit 1
37 -h|
--help) opt_help
=1; shift ;;
38 -q|
--quiet) opt_quiet
=$
(($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 Fix broken symlinks for new files from the last month (can be
52 overridden) in git-annex. Useful when moving lots of files around and
53 committing with --no-verify (or disabling the automatic symlink fixing
54 in .git/hooks/pre-commit) to properly record file moves in Git.
56 Arguments and options after " -- " are delivered to git-allfiles(1)
57 which delivers them further to "git log".
59 Usage: $progname [options] [ -- options_to_git-allfiles ]
66 Be more quiet. Can be repeated to increase silence.
68 Increase level of verbosity. Can be repeated.
70 Print version information.
78 echo ==== $progname: $
*
81 toplevel
="$(git rev-parse --show-toplevel)"
83 echo $progname: $toplevel: Cannot chdir to top of repo
>&2
87 git wait-until-clean
-u
90 git allfiles
--since=1.month
"$@" |
92 xargs -d \\n
--no-run-if-empty ga fix