summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-04-10 05:43:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-10 05:43:18 (GMT)
commit3b0c19663e7976cd32188b42e762c980d1bb93d4 (patch)
tree73c9c829d7cc48cfa92417c8f9c2160c3f3a5882
parentda288e25d9e10b746cf3b311cb4503d1810cde37 (diff)
parent54fd955c211db6f4a2c91301f792ec9de86eed31 (diff)
downloadgit-3b0c19663e7976cd32188b42e762c980d1bb93d4.zip
git-3b0c19663e7976cd32188b42e762c980d1bb93d4.tar.gz
git-3b0c19663e7976cd32188b42e762c980d1bb93d4.tar.bz2
Merge branch 'maint'
* maint: Let check_preimage() use memset() to initialize "struct checkout" fetch/push: fix usage strings
-rw-r--r--Documentation/git-fetch.txt8
-rw-r--r--Documentation/git-push.txt2
-rw-r--r--builtin/apply.c5
-rw-r--r--builtin/fetch.c8
-rw-r--r--builtin/push.c2
5 files changed, 11 insertions, 14 deletions
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 948ea26..400fe7f 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -8,13 +8,13 @@ git-fetch - Download objects and refs from another repository
SYNOPSIS
--------
-'git fetch' <options> <repository> <refspec>...
+'git fetch' [<options>] [<repository> [<refspec>...]]
-'git fetch' <options> <group>
+'git fetch' [<options>] <group>
-'git fetch' --multiple <options> [<repository> | <group>]...
+'git fetch' --multiple [<options>] [<repository> | <group>]...
-'git fetch' --all <options>
+'git fetch' --all [<options>]
DESCRIPTION
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 59dc8b1..4857024 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -11,7 +11,7 @@ SYNOPSIS
[verse]
'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
[--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
- [<repository> <refspec>...]
+ [<repository> [<refspec>...]]
DESCRIPTION
-----------
diff --git a/builtin/apply.c b/builtin/apply.c
index 7ca9047..771c972 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -2824,11 +2824,8 @@ static int check_preimage(struct patch *patch, struct cache_entry **ce, struct s
if (stat_ret < 0) {
struct checkout costate;
/* checkout */
+ memset(&costate, 0, sizeof(costate));
costate.base_dir = "";
- costate.base_dir_len = 0;
- costate.force = 0;
- costate.quiet = 0;
- costate.not_new = 0;
costate.refresh_cache = 1;
if (checkout_entry(*ce, &costate, NULL) ||
lstat(old_name, st))
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 957be9f..8470850 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -14,10 +14,10 @@
#include "transport.h"
static const char * const builtin_fetch_usage[] = {
- "git fetch [options] [<repository> <refspec>...]",
- "git fetch [options] <group>",
- "git fetch --multiple [options] [<repository> | <group>]...",
- "git fetch --all [options]",
+ "git fetch [<options>] [<repository> [<refspec>...]]",
+ "git fetch [<options>] <group>",
+ "git fetch --multiple [<options>] [<repository> | <group>]...",
+ "git fetch --all [<options>]",
NULL
};
diff --git a/builtin/push.c b/builtin/push.c
index 62957ed..f4358b9 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -10,7 +10,7 @@
#include "parse-options.h"
static const char * const push_usage[] = {
- "git push [<options>] [<repository> <refspec>...]",
+ "git push [<options>] [<repository> [<refspec>...]]",
NULL,
};