@matheusbsbs / matheus-bagliano / commits / 673eb4a01f
Fork 0

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>

Stefan Naewe committed Dec 10, 2010 at 15:41 UTC 673eb4a01f340e5b0be0776fd05d1e84766182a3
1 file changed +11 -7
git-gui.sh
+11 -7
@@ -1448,13 +1448,17 @@ proc rescan_stage2 {fd after} {
1448 close $fd
1449 }
1450
1451 - set ls_others [list --exclude-per-directory=.gitignore]
1452 - if {[have_info_exclude]} {
1453 - lappend ls_others "--exclude-from=[gitdir info exclude]"
1454 - }
1455 - set user_exclude [get_config core.excludesfile]
1456 - if {$user_exclude ne {} && [file readable $user_exclude]} {
1457 - lappend ls_others "--exclude-from=$user_exclude"
1451 + if {[package vsatisfies $::_git_version 1.6.3]} {
1452 + set ls_others [list --exclude-standard]
1453 + } else {
1454 + set ls_others [list --exclude-per-directory=.gitignore]
1455 + if {[have_info_exclude]} {
1456 + lappend ls_others "--exclude-from=[gitdir info exclude]"
1457 + }
1458 + set user_exclude [get_config core.excludesfile]
1459 + if {$user_exclude ne {} && [file readable $user_exclude]} {
1460 + lappend ls_others "--exclude-from=[file normalize $user_exclude]"
1461 + }
1462 }
1463
1464 set buf_rdi {}