Walk traverses root and returns a sorted slice of relative paths for all
source files that are not excluded by .gitignore rules or alwaysIgnoreDirs.
extraIgnore is an optional list of additional gitignore-style patterns to
skip; it may be nil or empty to preserve the previous behaviour.