Merge branch 'sr/hooks-cwd-doc'
[gitweb.git] / builtin / bundle.c
index 4883a435a9afc607618d34c9b61b218eeda7de45..d0de59b94ff23eebe03984dc670babf793bdd5ff 100644 (file)
@@ -20,21 +20,15 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
        struct bundle_header header;
        const char *cmd, *bundle_file;
        int bundle_fd = -1;
-       char buffer[PATH_MAX];
 
        if (argc < 3)
                usage(builtin_bundle_usage);
 
        cmd = argv[1];
-       bundle_file = argv[2];
+       bundle_file = prefix_filename(prefix, argv[2]);
        argc -= 2;
        argv += 2;
 
-       if (prefix && bundle_file[0] != '/') {
-               snprintf(buffer, sizeof(buffer), "%s/%s", prefix, bundle_file);
-               bundle_file = buffer;
-       }
-
        memset(&header, 0, sizeof(header));
        if (strcmp(cmd, "create") && (bundle_fd =
                                read_bundle_header(bundle_file, &header)) < 0)