Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-03-16 10:08:34 +0300
committerJunio C Hamano <gitster@pobox.com>2011-03-16 22:49:02 +0300
commit9cba13ca5d233a4e1a7068f3f5ed5836a081dcc0 (patch)
tree434a9b6b6df083e8c340541def4c29c4896b0721 /builtin
parentc6c8d0b797e33ce1f22d50b46d9c6eba91ed2cbc (diff)
standardize brace placement in struct definitions
In a struct definitions, unlike functions, the prevailing style is for the opening brace to go on the same line as the struct name, like so: struct foo { int bar; char *baz; }; Indeed, grepping for 'struct [a-z_]* {$' yields about 5 times as many matches as 'struct [a-z_]*$'. Linus sayeth: Heretic people all over the world have claimed that this inconsistency is ... well ... inconsistent, but all right-thinking people know that (a) K&R are _right_ and (b) K&R are right. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c3
-rw-r--r--builtin/blame.c3
-rw-r--r--builtin/grep.c3
-rw-r--r--builtin/index-pack.c6
4 files changed, 5 insertions, 10 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 42c906ea06..1d74763f58 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -21,8 +21,7 @@ static const char * const builtin_add_usage[] = {
static int patch_interactive, add_interactive, edit_interactive;
static int take_worktree_changes;
-struct update_callback_data
-{
+struct update_callback_data {
int flags;
int add_errors;
};
diff --git a/builtin/blame.c b/builtin/blame.c
index aa30ec5269..f6b03f750a 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1312,8 +1312,7 @@ static void pass_blame(struct scoreboard *sb, struct origin *origin, int opt)
/*
* Information on commits, used for output.
*/
-struct commit_info
-{
+struct commit_info {
const char *author;
const char *author_mail;
unsigned long author_time;
diff --git a/builtin/grep.c b/builtin/grep.c
index fdf7131efd..34f9ae0304 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -40,8 +40,7 @@ enum work_type {WORK_SHA1, WORK_FILE};
* threads. The producer adds struct work_items to 'todo' and the
* consumers pick work items from the same array.
*/
-struct work_item
-{
+struct work_item {
enum work_type type;
char *name;
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 8dc5c0b541..c7e600db47 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -13,8 +13,7 @@
static const char index_pack_usage[] =
"git index-pack [-v] [-o <index-file>] [ --keep | --keep=<msg> ] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])";
-struct object_entry
-{
+struct object_entry {
struct pack_idx_entry idx;
unsigned long size;
unsigned int hdr_size;
@@ -44,8 +43,7 @@ struct base_data {
#define FLAG_LINK (1u<<20)
#define FLAG_CHECKED (1u<<21)
-struct delta_entry
-{
+struct delta_entry {
union delta_base base;
int obj_no;
};