Revision a3d023d0a3783612053f2149e784b43befceccad authored by Junio C Hamano on 31 October 2009, 01:45:34 UTC, committed by Junio C Hamano on 13 November 2009, 20:20:56 UTC
Provide a DEFAULT_PAGER knob so packagers can set the fallback pager to something appropriate during the build. Examples: On (old) solaris systems, /usr/bin/less (typically the first less found) doesn't understand the default arguments (FXRS), which forces users to alter their environment (PATH, GIT_PAGER, LESS, etc) or have a local or global gitconfig before paging works as expected. On Debian systems, by policy packages must fall back to the 'pager' command, so that changing the target of the /usr/bin/pager symlink changes the default pager for all packages at once. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 8f4b576
string-list.h
#ifndef PATH_LIST_H
#define PATH_LIST_H
struct string_list_item {
char *string;
void *util;
};
struct string_list
{
struct string_list_item *items;
unsigned int nr, alloc;
unsigned int strdup_strings:1;
};
void print_string_list(const char *text, const struct string_list *p);
void string_list_clear(struct string_list *list, int free_util);
/* Use this function to call a custom clear function on each util pointer */
/* The string associated with the util pointer is passed as the second argument */
typedef void (*string_list_clear_func_t)(void *p, const char *str);
void string_list_clear_func(struct string_list *list, string_list_clear_func_t clearfunc);
/* Use this function to iterate over each item */
typedef int (*string_list_each_func_t)(struct string_list_item *, void *);
int for_each_string_list(string_list_each_func_t,
struct string_list *list, void *cb_data);
/* Use these functions only on sorted lists: */
int string_list_has_string(const struct string_list *list, const char *string);
int string_list_find_insert_index(const struct string_list *list, const char *string,
int negative_existing_index);
struct string_list_item *string_list_insert(const char *string, struct string_list *list);
struct string_list_item *string_list_insert_at_index(int insert_at,
const char *string, struct string_list *list);
struct string_list_item *string_list_lookup(const char *string, struct string_list *list);
/* Use these functions only on unsorted lists: */
struct string_list_item *string_list_append(const char *string, struct string_list *list);
void sort_string_list(struct string_list *list);
int unsorted_string_list_has_string(struct string_list *list, const char *string);
#endif /* PATH_LIST_H */
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...