Merge branch 'jk/format-patch-from' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 28 Oct 2013 17:18:43 +0000 (10:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Oct 2013 17:18:43 +0000 (10:18 -0700)
"format-patch --from=<whom>" forgot to omit unnecessary in-body from
line, i.e. when <whom> is the same as the real author.

* jk/format-patch-from:
format-patch: print in-body "From" only when needed

1  2 
cache.h
diff --combined cache.h
index 85b544f38d934fe68d1e155c86337f1400eea14d,153081cfe28815512eae2d75ed736b5a8c0370fe..88d373dfe729ef20cec73ee9e20b8b0975e22b6c
+++ b/cache.h
@@@ -425,8 -425,6 +425,8 @@@ extern int path_inside_repo(const char 
  extern int set_git_dir_init(const char *git_dir, const char *real_git_dir, int);
  extern int init_db(const char *template_dir, unsigned int flags);
  
 +extern void sanitize_stdfds(void);
 +
  #define alloc_nr(x) (((x)+16)*3/2)
  
  /*
@@@ -478,7 -476,7 +478,7 @@@ extern int remove_file_from_index(struc
  extern int add_to_index(struct index_state *, const char *path, struct stat *, int flags);
  extern int add_file_to_index(struct index_state *, const char *path, int flags);
  extern struct cache_entry *make_cache_entry(unsigned int mode, const unsigned char *sha1, const char *path, int stage, int refresh);
 -extern int ce_same_name(struct cache_entry *a, struct cache_entry *b);
 +extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
  extern int index_name_is_other(const struct index_state *, const char *, int);
  extern void *read_blob_data_from_index(struct index_state *, const char *, unsigned long *);
  
  extern int ie_match_stat(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
  extern int ie_modified(const struct index_state *, const struct cache_entry *, struct stat *, unsigned int);
  
 -#define PATHSPEC_ONESTAR 1    /* the pathspec pattern sastisfies GFNM_ONESTAR */
 +#define PATHSPEC_ONESTAR 1    /* the pathspec pattern satisfies GFNM_ONESTAR */
  
  struct pathspec {
        const char **raw; /* get_pathspec() result, not freed by free_pathspec() */
@@@ -577,7 -575,6 +577,7 @@@ extern int assume_unchanged
  extern int prefer_symlink_refs;
  extern int log_all_ref_updates;
  extern int warn_ambiguous_refs;
 +extern int warn_on_object_refname_ambiguity;
  extern int shared_repository;
  extern const char *apply_default_whitespace;
  extern const char *apply_default_ignorewhitespace;
@@@ -761,7 -758,7 +761,7 @@@ int is_directory(const char *)
  const char *real_path(const char *path);
  const char *real_path_if_valid(const char *path);
  const char *absolute_path(const char *path);
 -const char *relative_path(const char *abs, const char *base);
 +const char *relative_path(const char *in, const char *prefix, struct strbuf *sb);
  int normalize_path_copy(char *dst, const char *src);
  int longest_ancestor_length(const char *path, struct string_list *prefixes);
  char *strip_path_suffix(const char *path, const char *suffix);
@@@ -966,6 -963,15 +966,15 @@@ struct ident_split 
   */
  extern int split_ident_line(struct ident_split *, const char *, int);
  
+ /*
+  * Compare split idents for equality or strict ordering. Note that we
+  * compare only the ident part of the line, ignoring any timestamp.
+  *
+  * Because there are two fields, we must choose one as the primary key; we
+  * currently arbitrarily pick the email.
+  */
+ extern int ident_cmp(const struct ident_split *, const struct ident_split *);
  struct checkout {
        const char *base_dir;
        int base_dir_len;
@@@ -1132,9 -1138,7 +1141,9 @@@ extern int unpack_object_header(struct 
  
  struct object_info {
        /* Request */
 +      enum object_type *typep;
        unsigned long *sizep;
 +      unsigned long *disk_sizep;
  
        /* Response */
        enum {
@@@ -1178,15 -1182,11 +1187,15 @@@ extern int update_server_info(int)
  typedef int (*config_fn_t)(const char *, const char *, void *);
  extern int git_default_config(const char *, const char *, void *);
  extern int git_config_from_file(config_fn_t fn, const char *, void *);
 +extern int git_config_from_buf(config_fn_t fn, const char *name,
 +                             const char *buf, size_t len, void *data);
  extern void git_config_push_parameter(const char *text);
  extern int git_config_from_parameters(config_fn_t fn, void *data);
  extern int git_config(config_fn_t fn, void *);
  extern int git_config_with_options(config_fn_t fn, void *,
 -                                 const char *filename, int respect_includes);
 +                                 const char *filename,
 +                                 const char *blob_ref,
 +                                 int respect_includes);
  extern int git_config_early(config_fn_t fn, void *, const char *repo_config);
  extern int git_parse_ulong(const char *, unsigned long *);
  extern int git_config_int(const char *, const char *);