summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 515cc01)
raw | patch | inline | side by side (parent: 515cc01)
author | Thiago Farina <tfransosi@gmail.com> | |
Sun, 29 Aug 2010 02:04:17 +0000 (23:04 -0300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 30 Aug 2010 05:42:49 +0000 (22:42 -0700) |
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c | patch | blob | history | |
builtin/grep.c | patch | blob | history | |
builtin/name-rev.c | patch | blob | history | |
object.h | patch | blob | history | |
reachable.c | patch | blob | history | |
shallow.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 834ec8b464d0ce5845a2312766554b60ed5d5d7e..ab792d5db2ba6e96acd6f8401879442667b66cfb 100644 (file)
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
int cmd_fast_export(int argc, const char **argv, const char *prefix)
{
struct rev_info revs;
- struct object_array commits = { 0, 0, NULL };
+ struct object_array commits = OBJECT_ARRAY_INIT;
struct string_list extra_refs = STRING_LIST_INIT_NODUP;
struct commit *commit;
char *export_filename = NULL, *import_filename = NULL;
diff --git a/builtin/grep.c b/builtin/grep.c
index cf6c29fa42d96f8bc8282e779617a60d40796166..b725ede0f7270637759b9fef52ab5450fc1712e2 100644 (file)
--- a/builtin/grep.c
+++ b/builtin/grep.c
int external_grep_allowed__ignored;
const char *show_in_pager = NULL, *default_pager = "dummy";
struct grep_opt opt;
- struct object_array list = { 0, 0, NULL };
+ struct object_array list = OBJECT_ARRAY_INIT;
const char **paths = NULL;
struct string_list path_list = STRING_LIST_INIT_NODUP;
int i;
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 06a38ac8c10126085e6477c205d450da089faae2..31f5c1c971381a9490b717e0413ee9a40260ef39 100644 (file)
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
int cmd_name_rev(int argc, const char **argv, const char *prefix)
{
- struct object_array revs = { 0, 0, NULL };
+ struct object_array revs = OBJECT_ARRAY_INIT;
int all = 0, transform_stdin = 0, allow_undefined = 1, always = 0;
struct name_ref_data data = { 0, 0, NULL };
struct option opts[] = {
diff --git a/object.h b/object.h
index 82877c831ca7fe39abbb98805f5801bdc6fcac9c..4d1d61546f0441bd198cda3ad153b35a91444b72 100644 (file)
--- a/object.h
+++ b/object.h
} *objects;
};
+#define OBJECT_ARRAY_INIT { 0, 0, NULL }
+
#define TYPE_BITS 3
#define FLAG_BITS 27
diff --git a/reachable.c b/reachable.c
index b515fa2de332cc570a8a32861bd8d6491b61133e..a03fabf060081e9fa5e0d753cd0d9cf4bca5062e 100644 (file)
--- a/reachable.c
+++ b/reachable.c
{
int i;
struct commit *commit;
- struct object_array objects = { 0, 0, NULL };
+ struct object_array objects = OBJECT_ARRAY_INIT;
/* Walk all commits, process their trees */
while ((commit = get_revision(revs)) != NULL)
diff --git a/shallow.c b/shallow.c
index 4d90eda19efe0a80c1cb39e8897ab3ed5e6fcf56..a0363dea203d2a06e985bb4e140ffc675428cbf8 100644 (file)
--- a/shallow.c
+++ b/shallow.c
{
int i = 0, cur_depth = 0;
struct commit_list *result = NULL;
- struct object_array stack = {0, 0, NULL};
+ struct object_array stack = OBJECT_ARRAY_INIT;
struct commit *commit = NULL;
while (commit || i < heads->nr || stack.nr) {
diff --git a/upload-pack.c b/upload-pack.c
index fc79ddef255a49176acab52c6492c1086b4e6e44..92f9530c6572a212c12ac917d774736286325e52 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
static void receive_needs(void)
{
- struct object_array shallows = {0, 0, NULL};
+ struct object_array shallows = OBJECT_ARRAY_INIT;
static char line[1000];
int len, depth = 0;