[PATCH] git-clean: consider core.excludesfile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



git-clean used "git ls-files" and "git ls-files" don't consider
core.excludesfile.
i add few lines.

--- /usr/bin/git-clean  2007-11-14 08:26:20.000000000 +0900
+++ git-clean   2007-11-14 09:43:03.000000000 +0900
@@ -81,9 +81,14 @@
       if [ "$ignoredonly" ]; then
               excl="$excl --ignored"
       fi
+       core_excl="`git-config core.excludesfile`"
+       if [ -f "$core_excl" ]; then
+               core_excl_info="--exclude-from=$core_excl"
+       fi
 fi

-git ls-files --others --directory $excl ${excl_info:+"$excl_info"} -- "$@" |
+git ls-files --others --directory $excl ${excl_info:+"$excl_info"} \
+${core_excl_info:+"$core_excl_info"} -- "$@" |
 while read -r file; do
       if [ -d "$file" -a ! -L "$file" ]; then
               if [ -z "$cleandir" ]; then
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux