From: Junio C Hamano Date: Sun, 1 Jul 2007 21:57:51 +0000 (-0700) Subject: Merge branch 'jc/quote' X-Git-Tag: v1.5.3-rc0~25 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/660d579d6ff0ac29b8f7b38b3da73f09214d39aa?hp=-c Merge branch 'jc/quote' * jc/quote: Add core.quotepath configuration variable. --- 660d579d6ff0ac29b8f7b38b3da73f09214d39aa diff --combined Documentation/config.txt index 3dc17a6d78,34b1c97102..50503e84b9 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@@ -117,6 -117,18 +117,18 @@@ core.fileMode: the working copy are ignored; useful on broken filesystems like FAT. See gitlink:git-update-index[1]. True by default. + core.quotepath:: + The commands that output paths (e.g. `ls-files`, + `diff`), when not given the `-z` option, will quote + "unusual" characters in the pathname by enclosing the + pathname in a double-quote pair and with backslashes the + same way strings in C source code are quoted. If this + variable is set to false, the bytes higher than 0x80 are + not quoted but output as verbatim. Note that double + quote, backslash and control characters are always + quoted without `-z` regardless of the setting of this + variable. + core.autocrlf:: If true, makes git convert `CRLF` at the end of lines in text files to `LF` when reading from the filesystem, and convert in reverse when @@@ -172,13 -184,6 +184,13 @@@ repository that ends in "/.git" is assu false), while all other repositories are assumed to be bare (bare = true). +core.worktree:: + Set the path to the working tree. The value will not be + used in combination with repositories found automatically in + a .git directory (i.e. $GIT_DIR is not set). + This can be overriden by the GIT_WORK_TREE environment + variable and the '--work-tree' command line option. + core.logAllRefUpdates:: Updates to a ref is logged to the file "$GIT_DIR/logs/", by appending the new and old diff --combined cache.h index dcadfef929,67763571b5..0d23a25b1f --- a/cache.h +++ b/cache.h @@@ -192,7 -192,6 +192,7 @@@ enum object_type }; #define GIT_DIR_ENVIRONMENT "GIT_DIR" +#define GIT_WORK_TREE_ENVIRONMENT "GIT_WORK_TREE" #define DEFAULT_GIT_DIR_ENVIRONMENT ".git" #define DB_ENVIRONMENT "GIT_OBJECT_DIRECTORY" #define INDEX_ENVIRONMENT "GIT_INDEX_FILE" @@@ -208,7 -207,6 +208,7 @@@ extern int is_bare_repository_cfg; extern int is_bare_repository(void); extern int is_inside_git_dir(void); +extern int is_inside_work_tree(void); extern const char *get_git_dir(void); extern char *get_object_directory(void); extern char *get_refs_directory(void); @@@ -294,6 -292,7 +294,7 @@@ extern int delete_ref(const char *, con /* Environment bits from configuration mechanism */ extern int trust_executable_bit; + extern int quote_path_fully; extern int has_symlinks; extern int assume_unchanged; extern int prefer_symlink_refs; @@@ -534,8 -533,6 +535,8 @@@ extern char git_default_name[MAX_GITNAM extern const char *git_commit_encoding; extern const char *git_log_output_encoding; +/* IO helper functions */ +extern void maybe_flush_or_die(FILE *, const char *); extern int copy_fd(int ifd, int ofd); extern int read_in_full(int fd, void *buf, size_t count); extern int write_in_full(int fd, const void *buf, size_t count);