mirror of
https://github.com/flynx/git-utils.git
synced 2025-10-29 03:00:10 +00:00
Compare commits
No commits in common. "a773d1a6683ba3a7053b78c36eb83fb568b77771" and "ef04c3f59b7c85bed8342d760b15cce0330618e9" have entirely different histories.
a773d1a668
...
ef04c3f59b
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2023-2024, Alex A. Naanou
|
Copyright (c) 2023, Alex A. Naanou
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
|
|
||||||
while true ; do
|
|
||||||
case $1 in
|
|
||||||
-h|--help)
|
|
||||||
echo "Usage: $(basename "$0") MODE FILE ..."
|
|
||||||
echo
|
|
||||||
echo "Change file mode on file(s)."
|
|
||||||
echo
|
|
||||||
echo "Options:"
|
|
||||||
echo " -h --help - print this message and exit"
|
|
||||||
echo
|
|
||||||
echo "This is equivalent to:"
|
|
||||||
echo " $ git update-index --chmod=MODE FILE ..."
|
|
||||||
echo
|
|
||||||
echo "This is useful in default configurations of git on Windows."
|
|
||||||
echo
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*|--*)
|
|
||||||
echo "Error: unknown option: \"$1\"" >&2
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $# < 2 ]] ; then
|
|
||||||
echo "Error need at least two arguments."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
MODE=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
|
|
||||||
git update-index --chmod="$MODE" "$@"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# vim:set sw=4 ts=4 :
|
|
||||||
@ -76,3 +76,8 @@ done
|
|||||||
|
|
||||||
|
|
||||||
# vim:set sw=4 ts=4 :
|
# vim:set sw=4 ts=4 :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user