From 22b6b82f2c0d95ce7a433394a6c0574a5714cf4c Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Thu, 20 Jun 2013 12:16:06 -0700 Subject: Add status flags to force output sort order Files in status will, be default, be sorted according to the case insensitivity of the filesystem that we're running on. However, in some cases, this is not desirable. Even on case insensitive file systems, 'git status' at the command line will generally use a case sensitive sort (like 'ls'). Some GUIs prefer to display a list of file case insensitively even on case-sensitive platforms. This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the default sort order of the status output and give the user control. This includes tests for exercising these new options and makes the examples/status.c program emulate core Git and always use a case sensitive sort. --- src/attr_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/attr_file.c') diff --git a/src/attr_file.c b/src/attr_file.c index d059cfec7..d880398e8 100644 --- a/src/attr_file.c +++ b/src/attr_file.c @@ -498,7 +498,7 @@ int git_attr_assignment__parse( assert(assigns && !assigns->length); - assigns->_cmp = sort_by_hash_and_name; + git_vector_set_cmp(assigns, sort_by_hash_and_name); while (*scan && *scan != '\n') { const char *name_start, *value_start; -- cgit v1.2.3