aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Naewe <stefan.naewe@googlemail.com>2010-12-10 15:41:09 +0000
committerPat Thoyts <patthoyts@users.sourceforge.net>2010-12-10 15:42:09 +0000
commit673eb4a01f340e5b0be0776fd05d1e84766182a3 (patch)
tree2fffb3f5f287d62828e98c14902fdd3b2bbd22d5
parent88b21c2a407833a66f9aeb650f5b96c672691ecf (diff)
downloadgit-673eb4a01f340e5b0be0776fd05d1e84766182a3.tar.gz
git-673eb4a01f340e5b0be0776fd05d1e84766182a3.tar.xz
git-gui: use --exclude-standard to check for untracked files
This fixes git-gui failing to display untracked files that are listed if core.excludefiles is set to ~/.gitexcludes [PT: added expansion of core.excludesfile value by tcl] Signed-off-by: Stefan Naewe <stefan.naewe@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
-rwxr-xr-xgit-gui.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/git-gui.sh b/git-gui.sh
index c85a53c06..8c3cf6b85 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1448,13 +1448,17 @@ proc rescan_stage2 {fd after} {
close $fd
}
- set ls_others [list --exclude-per-directory=.gitignore]
- if {[have_info_exclude]} {
- lappend ls_others "--exclude-from=[gitdir info exclude]"
- }
- set user_exclude [get_config core.excludesfile]
- if {$user_exclude ne {} && [file readable $user_exclude]} {
- lappend ls_others "--exclude-from=$user_exclude"
+ if {[package vsatisfies $::_git_version 1.6.3]} {
+ set ls_others [list --exclude-standard]
+ } else {
+ set ls_others [list --exclude-per-directory=.gitignore]
+ if {[have_info_exclude]} {
+ lappend ls_others "--exclude-from=[gitdir info exclude]"
+ }
+ set user_exclude [get_config core.excludesfile]
+ if {$user_exclude ne {} && [file readable $user_exclude]} {
+ lappend ls_others "--exclude-from=[file normalize $user_exclude]"
+ }
}
set buf_rdi {}