Merge commit 'junio/spr/prefix-relocate-maint' into devel

This commit is contained in:
Steffen Prohaska
2008-09-23 07:39:37 +02:00
9 changed files with 35 additions and 0 deletions

View File

@@ -2170,6 +2170,9 @@ int main(int argc, char **argv)
struct ref *ref;
char *rewritten_url = NULL;
if (argv[0] && *argv[0])
git_extract_argv0_path(argv[0]);
setup_git_directory();
remote = xcalloc(sizeof(*remote), 1);

View File

@@ -23,6 +23,7 @@
*/
#include "cache.h"
#include "exec_cmd.h"
typedef struct store_conf {
char *name;
@@ -1293,6 +1294,9 @@ main(int argc, char **argv)
int r;
int total, n = 0;
if (argv[0] && *argv[0])
git_extract_argv0_path(argv[0]);
/* init the random number generator */
arc4_init();

View File

@@ -1,5 +1,6 @@
#include "cache.h"
#include "run-command.h"
#include "exec_cmd.h"
static const char *pgm;
static const char *arguments[9];
@@ -93,6 +94,9 @@ int main(int argc, char **argv)
if (argc < 3)
usage("git-merge-index [-o] [-q] <merge-program> (-a | [--] <filename>*)");
if (argv[0] && *argv[0])
git_extract_argv0_path(argv[0]);
setup_git_directory();
read_cache();

View File

@@ -2,6 +2,7 @@
#include "tree-walk.h"
#include "xdiff-interface.h"
#include "blob.h"
#include "exec_cmd.h"
static const char merge_tree_usage[] = "git-merge-tree <base-tree> <branch1> <branch2>";
static int resolve_directories = 1;
@@ -345,6 +346,9 @@ int main(int argc, char **argv)
if (argc != 4)
usage(merge_tree_usage);
if (argv[0] && *argv[0])
git_extract_argv0_path(argv[0]);
setup_git_directory();
buf1 = get_tree_descriptor(t+0, argv[1]);

View File

@@ -1,5 +1,6 @@
#include "cache.h"
#include "tag.h"
#include "exec_cmd.h"
/*
* A signature file has a very simple fixed format: four lines
@@ -159,6 +160,9 @@ int main(int argc, char **argv)
if (argc != 1)
usage("git-mktag < signaturefile");
if (argv[0] && *argv[0])
git_extract_argv0_path(argv[0]);
setup_git_directory();
strbuf_init(&buf, 0);

View File

@@ -6,6 +6,7 @@
#include "cache.h"
#include "quote.h"
#include "tree.h"
#include "exec_cmd.h"
static struct treeent {
unsigned mode;
@@ -70,6 +71,9 @@ int main(int ac, char **av)
unsigned char sha1[20];
int line_termination = '\n';
if (av[0] && *av[0])
git_extract_argv0_path(av[0]);
setup_git_directory();
while ((1 < ac) && av[1][0] == '-') {

View File

@@ -7,6 +7,7 @@
*/
#include "cache.h"
#include "exec_cmd.h"
#define BLKSIZE 512
@@ -601,6 +602,9 @@ int main(int argc, char **argv)
unsigned char *sha1;
char buf[42]; /* 40 byte sha1 + \n + \0 */
if (argv[0] && *argv[0])
git_extract_argv0_path(argv[0]);
setup_git_directory();
for (i = 1; i < argc; i++) {

View File

@@ -1,4 +1,5 @@
#include "cache.h"
#include "exec_cmd.h"
static void flush_current_id(int patchlen, unsigned char *id, SHA_CTX *c)
{
@@ -79,6 +80,9 @@ int main(int argc, char **argv)
if (argc != 1)
usage(patch_id_usage);
if (argv[0] && *argv[0])
git_extract_argv0_path(argv[0]);
generate_id_list();
return 0;
}

View File

@@ -1,4 +1,5 @@
#include "cache.h"
#include "exec_cmd.h"
static const char update_server_info_usage[] =
"git update-server-info [--force]";
@@ -19,6 +20,9 @@ int main(int ac, char **av)
if (i != ac)
usage(update_server_info_usage);
if (av[0] && *av[0])
git_extract_argv0_path(av[0]);
setup_git_directory();
return !!update_server_info(force);