Merge branch 'jc/quote'
authorJunio C Hamano <gitster@pobox.com>
Sun, 1 Jul 2007 21:57:51 +0000 (14:57 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 1 Jul 2007 21:57:51 +0000 (14:57 -0700)
* jc/quote:
Add core.quotepath configuration variable.

1  2 
Documentation/config.txt
cache.h
diff --combined Documentation/config.txt
index 3dc17a6d787a542d35d41207b9f00e19779ec943,34b1c971028929570daad6c12da9215392fe13d9..50503e84b92f92532d97c7730eba2a10e9e380a2
@@@ -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 <ref> is logged to the file
        "$GIT_DIR/logs/<ref>", by appending the new and old
diff --combined cache.h
index dcadfef929bd0638cfcc9ac42bb43f264d0c0b63,67763571b5c5e7d98081abe67488a55fad19b77b..0d23a25b1f7d4ff62c9888aa69e0bf3f2884b811
+++ 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"
  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);