sha1_name.c: rename "now" to "current"
[gitweb.git] / upload-pack.c
index 8739bfacdfd4e01e16a614dd419388fa93a904b6..6f36f6255c3f4e3db4cdc7ca9b9dcca56846c72d 100644 (file)
@@ -84,22 +84,11 @@ static void show_commit(struct commit *commit, void *data)
        commit->buffer = NULL;
 }
 
-static void show_object(struct object *obj, const struct name_path *path, const char *component)
+static void show_object(struct object *obj,
+                       const struct name_path *path, const char *component,
+                       void *cb_data)
 {
-       /* An object with name "foo\n0000000..." can be used to
-        * confuse downstream git-pack-objects very badly.
-        */
-       const char *name = path_name(path, component);
-       const char *ep = strchr(name, '\n');
-       if (ep) {
-               fprintf(pack_pipe, "%s %.*s\n", sha1_to_hex(obj->sha1),
-                      (int) (ep - name),
-                      name);
-       }
-       else
-               fprintf(pack_pipe, "%s %s\n",
-                               sha1_to_hex(obj->sha1), name);
-       free((char *)name);
+       show_object_with_name(pack_pipe, obj, path, component);
 }
 
 static void show_edge(struct commit *commit)
@@ -795,6 +784,8 @@ int main(int argc, char **argv)
        int i;
        int strict = 0;
 
+       git_setup_gettext();
+
        packet_trace_identity("upload-pack");
        git_extract_argv0_path(argv[0]);
        read_replace_refs = 0;