You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Paul Burba <pt...@gmail.com> on 2013/01/11 21:36:29 UTC
Do we expect default ignores when no ignores are defined anywhere?
I was a bit surprised to learn today that if one has no global-ignore
options defined in any of the run-time configs, then Subversion
assumes a default value of "*.o *.lo *.la *.al .libs *.so *.so.[0-9]*
*.a *.pyc *.pyo __pycache__ *.rej *~ #*# .#* .*.swp .DS_Store":
svn_error_t *
svn_wc_get_default_ignores(apr_array_header_t **patterns,
apr_hash_t *config,
apr_pool_t *pool)
{
svn_config_t *cfg = config ? apr_hash_get(config,
SVN_CONFIG_CATEGORY_CONFIG,
APR_HASH_KEY_STRING) : NULL;
const char *val;
VVVVVVVVVV
/* Check the Subversion run-time configuration for global ignores.
If no configuration value exists, we fall back to our defaults. */
svn_config_get(cfg, &val, SVN_CONFIG_SECTION_MISCELLANY,
SVN_CONFIG_OPTION_GLOBAL_IGNORES,
SVN_CONFIG_DEFAULT_GLOBAL_IGNORES);
^^^^^^^^^^
*patterns = apr_array_make(pool, 16, sizeof(const char *));
/* Split the patterns on whitespace, and stuff them into *PATTERNS. */
svn_cstring_split_append(*patterns, val, "\n\r\t\v ", FALSE, pool);
return SVN_NO_ERROR;
}
#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
"*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__"
#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
"*.rej *~ #*# .#* .*.swp .DS_Store"
#define SVN_CONFIG_DEFAULT_GLOBAL_IGNORES \
SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 " " \
SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2
This seems wrong to me. I'd expect that if I have no global-ignores
defined in any of my runtimes that nothing will be ignored. If we
feel so strongly that these default ignores should be used, why do we
create a default user config with them commented out? This code is
very old however so I wonder if there is not some good reason for this
behavior. Thoughts?
--
Paul T. Burba
CollabNet, Inc. -- www.collab.net -- Enterprise Cloud Development
Skype: ptburba
Re: Do we expect default ignores when no ignores are defined
anywhere?
Posted by Daniel Shahaf <da...@elego.de>.
Paul Burba wrote on Fri, Jan 11, 2013 at 15:36:29 -0500:
> This seems wrong to me. I'd expect that if I have no global-ignores
> defined in any of my runtimes that nothing will be ignored. If we
> feel so strongly that these default ignores should be used, why do we
> create a default user config with them commented out? This code is
> very old however so I wonder if there is not some good reason for this
> behavior. Thoughts?
We have many placevs where the default config file contains the default
value commented out --- i.e., such that uncommenting the line has no
effect on the value used at run-time.
I don't know why the default global-ignores (if there's no runtime
config) is what it is.