{"thread":{"id":"35126","subject":"[PATCH 10/20] doc: git-foo was obsoleted several years ago","startedAt":"2013-10-12T07:06:56Z","lastAt":"2013-10-14T21:21:43Z","messageCount":26,"participants":["Felipe Contreras","Stefan Beller","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":20},"messages":[{"id":"228840","messageId":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":null,"subject":"[PATCH 10/20] doc: git-foo was obsoleted several years ago","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:06:56Z","receivedAt":"2013-10-12T07:06:56Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"So replace 'git-foo' with 'git foo'.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Documentation/git-checkout.txt | 4 ++--\n Documentation/git-commit.txt   | 4 ++--\n Documentation/git-rebase.txt   | 4 ++--\n Documentation/git-status.txt   | 4 ++--\n 4 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex 91294f8..7560113 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -1,9 +1,9 @@\n-git-checkout(1)\n+git checkout(1)\n ===============\n \n NAME\n ----\n-git-checkout - Checkout a branch or paths to the working tree\n+git checkout - Checkout a branch or paths to the working tree\n \n SYNOPSIS\n --------\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex 1a7616c..51f6b81 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -1,9 +1,9 @@\n-git-commit(1)\n+git commit(1)\n =============\n \n NAME\n ----\n-git-commit - Record changes to the repository\n+git commit - Record changes to the repository\n \n SYNOPSIS\n --------\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 94e07fd..9a8d158 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -1,9 +1,9 @@\n-git-rebase(1)\n+git rebase(1)\n =============\n \n NAME\n ----\n-git-rebase - Forward-port local commits to the updated upstream head\n+git rebase - Forward-port local commits to the updated upstream head\n \n SYNOPSIS\n --------\ndiff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\nindex a4acaa0..6fb7561 100644\n--- a/Documentation/git-status.txt\n+++ b/Documentation/git-status.txt\n@@ -1,9 +1,9 @@\n-git-status(1)\n+git status(1)\n =============\n \n NAME\n ----\n-git-status - Show the working tree status\n+git status - Show the working tree status\n \n \n SYNOPSIS\n-- \n1.8.4-fc\n"},{"id":"228841","messageId":"1381561636-20717-2-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 00/20] Trivial paches","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:06:57Z","receivedAt":"2013-10-12T07:06:57Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"\n\nFelipe Contreras (20):\n  merge: simplify ff-only option\n  t: replace pulls with merges\n  pull: cleanup documentation\n  fetch: add missing documentation\n  remote: fix trivial memory leak\n  revision: add missing include\n  shortlog: add missing declaration\n  branch: trivial style fix\n  sha1-name: trivial style cleanup\n  doc: git-foo was obsoleted several years ago\n  symbolic-ref: trivial style fix\n  alias: trivial style fix\n  transport-helper: trivial style fix\n  describe: trivial style fixes\n  pretty: trivial style fix\n  revision: trivial style fixes\n  diff: trivial style fix\n  run-command: trivial style fixes\n  setup: trivial style fixes\n  add: avoid yoda conditions\n\n Documentation/git-checkout.txt         |  4 ++--\n Documentation/git-commit.txt           |  4 ++--\n Documentation/git-fetch.txt            |  3 +++\n Documentation/git-pull.txt             |  4 ++--\n Documentation/git-rebase.txt           |  4 ++--\n Documentation/git-status.txt           |  4 ++--\n alias.c                                | 13 +++++++------\n builtin/add.c                          |  2 +-\n builtin/branch.c                       |  3 +--\n builtin/describe.c                     |  7 +++----\n builtin/diff.c                         |  2 +-\n builtin/merge.c                        | 11 ++---------\n builtin/symbolic-ref.c                 |  2 +-\n pretty.c                               |  2 +-\n remote.c                               |  3 ++-\n revision.c                             | 14 ++++++--------\n revision.h                             |  1 +\n run-command.c                          | 13 +++++--------\n setup.c                                |  4 ++--\n sha1_name.c                            |  1 -\n shortlog.h                             |  2 ++\n t/annotate-tests.sh                    |  2 +-\n t/t4200-rerere.sh                      |  2 +-\n t/t9114-git-svn-dcommit-merge.sh       |  2 +-\n t/t9500-gitweb-standalone-no-errors.sh |  2 +-\n transport-helper.c                     |  1 +\n 26 files changed, 53 insertions(+), 59 deletions(-)\n\n-- \n1.8.4-fc\n"},{"id":"228842","messageId":"1381561636-20717-3-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 03/20] pull: cleanup documentation","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:06:58Z","receivedAt":"2013-10-12T07:06:58Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"'origin/master' is very clear, no need to specify the 'remotes/' prefix,\nor babysit the user.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Documentation/git-pull.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt\nindex beea10b..03a39bc 100644\n--- a/Documentation/git-pull.txt\n+++ b/Documentation/git-pull.txt\n@@ -39,7 +39,7 @@ Assume the following history exists and the current branch is\n \"`master`\":\n \n ------------\n-\t  A---B---C master on origin\n+\t  A---B---C origin/master\n \t /\n     D---E---F---G master\n ------------\n@@ -51,7 +51,7 @@ result in a new commit along with the names of the two parent commits\n and a log message from the user describing the changes.\n \n ------------\n-\t  A---B---C remotes/origin/master\n+\t  A---B---C origin/master\n \t /         \\\n     D---E---F---G---H master\n ------------\n-- \n1.8.4-fc\n"},{"id":"228843","messageId":"1381561636-20717-4-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 20/20] add: avoid yoda conditions","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:06:59Z","receivedAt":"2013-10-12T07:06:59Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin/add.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 226f758..9b30356 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -429,7 +429,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \targc--;\n \targv++;\n \n-\tif (0 <= addremove_explicit)\n+\tif (addremove_explicit >= 0)\n \t\taddremove = addremove_explicit;\n \telse if (take_worktree_changes && ADDREMOVE_DEFAULT)\n \t\taddremove = 0; /* \"-u\" was given but not \"-A\" */\n-- \n1.8.4-fc\n"},{"id":"228844","messageId":"1381561636-20717-5-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 08/20] branch: trivial style fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:00Z","receivedAt":"2013-10-12T07:07:00Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin/branch.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/builtin/branch.c b/builtin/branch.c\nindex ad0f86d..5696cf0 100644\n--- a/builtin/branch.c\n+++ b/builtin/branch.c\n@@ -975,9 +975,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)\n \t\t\tdie(_(\"no such branch '%s'\"), argv[0]);\n \t\t}\n \n-\t\tif (!branch_has_merge_config(branch)) {\n+\t\tif (!branch_has_merge_config(branch))\n \t\t\tdie(_(\"Branch '%s' has no upstream information\"), branch->name);\n-\t\t}\n \n \t\tstrbuf_addf(&buf, \"branch.%s.remote\", branch->name);\n \t\tgit_config_set_multivar(buf.buf, NULL, NULL, 1);\n-- \n1.8.4-fc\n"},{"id":"228862","messageId":"1381561636-20717-6-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 15/20] pretty: trivial style fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:01Z","receivedAt":"2013-10-12T07:07:01Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n pretty.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/pretty.c b/pretty.c\nindex b4e32b7..962e82b 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -497,7 +497,7 @@ void pp_user_info(struct pretty_print_context *pp,\n static int is_empty_line(const char *line, int *len_p)\n {\n \tint len = *len_p;\n-\twhile (len && isspace(line[len-1]))\n+\twhile (len && isspace(line[len - 1]))\n \t\tlen--;\n \t*len_p = len;\n \treturn !len;\n-- \n1.8.4-fc\n"},{"id":"228845","messageId":"1381561636-20717-7-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 19/20] setup: trivial style fixes","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:02Z","receivedAt":"2013-10-12T07:07:02Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n setup.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/setup.c b/setup.c\nindex f08dd64..c717db4 100644\n--- a/setup.c\n+++ b/setup.c\n@@ -566,7 +566,7 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)\n {\n \tconst char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT);\n \tstruct string_list ceiling_dirs = STRING_LIST_INIT_DUP;\n-\tstatic char cwd[PATH_MAX+1];\n+\tstatic char cwd[PATH_MAX + 1];\n \tconst char *gitdirenv, *ret;\n \tchar *gitfile;\n \tint len, offset, offset_parent, ceil_offset = -1;\n@@ -581,7 +581,7 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)\n \tif (nongit_ok)\n \t\t*nongit_ok = 0;\n \n-\tif (!getcwd(cwd, sizeof(cwd)-1))\n+\tif (!getcwd(cwd, sizeof(cwd) - 1))\n \t\tdie_errno(\"Unable to read current working directory\");\n \toffset = len = strlen(cwd);\n \n-- \n1.8.4-fc\n"},{"id":"228846","messageId":"1381561636-20717-8-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 13/20] transport-helper: trivial style fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:03Z","receivedAt":"2013-10-12T07:07:03Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n transport-helper.c | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/transport-helper.c b/transport-helper.c\nindex b32e2d6..673b7c2 100644\n--- a/transport-helper.c\n+++ b/transport-helper.c\n@@ -269,6 +269,7 @@ static const char *unsupported_options[] = {\n \tTRANS_OPT_THIN,\n \tTRANS_OPT_KEEP\n \t};\n+\n static const char *boolean_options[] = {\n \tTRANS_OPT_THIN,\n \tTRANS_OPT_KEEP,\n-- \n1.8.4-fc\n"},{"id":"228847","messageId":"1381561636-20717-9-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 01/20] merge: simplify ff-only option","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:04Z","receivedAt":"2013-10-12T07:07:04Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"No functional changes.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin/merge.c | 11 ++---------\n 1 file changed, 2 insertions(+), 9 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 02a69c1..41fb66d 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -186,13 +186,6 @@ static int option_parse_n(const struct option *opt,\n \treturn 0;\n }\n \n-static int option_parse_ff_only(const struct option *opt,\n-\t\t\t  const char *arg, int unset)\n-{\n-\tfast_forward = FF_ONLY;\n-\treturn 0;\n-}\n-\n static struct option builtin_merge_options[] = {\n \t{ OPTION_CALLBACK, 'n', NULL, NULL, NULL,\n \t\tN_(\"do not show a diffstat at the end of the merge\"),\n@@ -210,9 +203,9 @@ static struct option builtin_merge_options[] = {\n \tOPT_BOOL('e', \"edit\", &option_edit,\n \t\tN_(\"edit message before committing\")),\n \tOPT_SET_INT(0, \"ff\", &fast_forward, N_(\"allow fast-forward (default)\"), FF_ALLOW),\n-\t{ OPTION_CALLBACK, 0, \"ff-only\", NULL, NULL,\n+\t{ OPTION_SET_INT, 0, \"ff-only\", &fast_forward, NULL,\n \t\tN_(\"abort if fast-forward is not possible\"),\n-\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG, option_parse_ff_only },\n+\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, FF_ONLY },\n \tOPT_RERERE_AUTOUPDATE(&allow_rerere_auto),\n \tOPT_BOOL(0, \"verify-signatures\", &verify_signatures,\n \t\tN_(\"Verify that the named commit has a valid GPG signature\")),\n-- \n1.8.4-fc\n"},{"id":"228849","messageId":"1381561636-20717-10-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 16/20] revision: trivial style fixes","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:05Z","receivedAt":"2013-10-12T07:07:05Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n revision.c | 14 ++++++--------\n 1 file changed, 6 insertions(+), 8 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex 0173e01..4049867 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1503,7 +1503,7 @@ struct cmdline_pathspec {\n static void append_prune_data(struct cmdline_pathspec *prune, const char **av)\n {\n \twhile (*av) {\n-\t\tALLOC_GROW(prune->path, prune->nr+1, prune->alloc);\n+\t\tALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);\n \t\tprune->path[prune->nr++] = *(av++);\n \t}\n }\n@@ -1515,7 +1515,7 @@ static void read_pathspec_from_stdin(struct rev_info *revs, struct strbuf *sb,\n \t\tint len = sb->len;\n \t\tif (len && sb->buf[len - 1] == '\\n')\n \t\t\tsb->buf[--len] = '\\0';\n-\t\tALLOC_GROW(prune->path, prune->nr+1, prune->alloc);\n+\t\tALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);\n \t\tprune->path[prune->nr++] = xstrdup(sb->buf);\n \t}\n }\n@@ -2118,7 +2118,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s\n \t\t *\tcall init_pathspec() to set revs->prune_data here.\n \t\t * }\n \t\t */\n-\t\tALLOC_GROW(prune_data.path, prune_data.nr+1, prune_data.alloc);\n+\t\tALLOC_GROW(prune_data.path, prune_data.nr + 1, prune_data.alloc);\n \t\tprune_data.path[prune_data.nr++] = NULL;\n \t\tparse_pathspec(&revs->prune_data, 0, 0,\n \t\t\t       revs->prefix, prune_data.path);\n@@ -2971,7 +2971,7 @@ static struct commit *get_revision_internal(struct rev_info *revs)\n \tif (revs->max_count) {\n \t\tc = get_revision_1(revs);\n \t\tif (c) {\n-\t\t\twhile (0 < revs->skip_count) {\n+\t\t\twhile (revs->skip_count > 0) {\n \t\t\t\trevs->skip_count--;\n \t\t\t\tc = get_revision_1(revs);\n \t\t\t\tif (!c)\n@@ -2986,9 +2986,8 @@ static struct commit *get_revision_internal(struct rev_info *revs)\n \tif (c)\n \t\tc->object.flags |= SHOWN;\n \n-\tif (!revs->boundary) {\n+\tif (!revs->boundary)\n \t\treturn c;\n-\t}\n \n \tif (!c) {\n \t\t/*\n@@ -3034,9 +3033,8 @@ struct commit *get_revision(struct rev_info *revs)\n \n \tif (revs->reverse) {\n \t\treversed = NULL;\n-\t\twhile ((c = get_revision_internal(revs))) {\n+\t\twhile ((c = get_revision_internal(revs)))\n \t\t\tcommit_list_insert(c, &reversed);\n-\t\t}\n \t\trevs->commits = reversed;\n \t\trevs->reverse = 0;\n \t\trevs->reverse_output_stage = 1;\n-- \n1.8.4-fc\n"},{"id":"228857","messageId":"1381561636-20717-11-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 17/20] diff: trivial style fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:06Z","receivedAt":"2013-10-12T07:07:06Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin/diff.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/diff.c b/builtin/diff.c\nindex 2fb8c5d..adb93a9 100644\n--- a/builtin/diff.c\n+++ b/builtin/diff.c\n@@ -169,7 +169,7 @@ static int builtin_diff_tree(struct rev_info *revs,\n \tif (ent1->item->flags & UNINTERESTING)\n \t\tswap = 1;\n \tsha1[swap] = ent0->item->sha1;\n-\tsha1[1-swap] = ent1->item->sha1;\n+\tsha1[1 - swap] = ent1->item->sha1;\n \tdiff_tree_sha1(sha1[0], sha1[1], \"\", &revs->diffopt);\n \tlog_tree_diff_flush(revs);\n \treturn 0;\n-- \n1.8.4-fc\n"},{"id":"228848","messageId":"1381561636-20717-12-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 05/20] remote: fix trivial memory leak","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:07Z","receivedAt":"2013-10-12T07:07:07Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"There's no need to set the default remote name beforehand, only to be\noverridden later on, and causing a memory leak, we can do it after the\nconfiguration has been handled.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n remote.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/remote.c b/remote.c\nindex e9fedfa..ce9d82a 100644\n--- a/remote.c\n+++ b/remote.c\n@@ -483,7 +483,6 @@ static void read_config(void)\n \tint flag;\n \tif (default_remote_name) /* did this already */\n \t\treturn;\n-\tdefault_remote_name = xstrdup(\"origin\");\n \tcurrent_branch = NULL;\n \thead_ref = resolve_ref_unsafe(\"HEAD\", sha1, 0, &flag);\n \tif (head_ref && (flag & REF_ISSYMREF) &&\n@@ -492,6 +491,8 @@ static void read_config(void)\n \t\t\tmake_branch(head_ref + strlen(\"refs/heads/\"), 0);\n \t}\n \tgit_config(handle_config, NULL);\n+\tif (!default_remote_name)\n+\t\tdefault_remote_name = xstrdup(\"origin\");\n \talias_all_urls();\n }\n \n-- \n1.8.4-fc\n"},{"id":"228850","messageId":"1381561636-20717-13-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 07/20] shortlog: add missing declaration","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:08Z","receivedAt":"2013-10-12T07:07:08Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Otherwise we would have to include commit.h.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n shortlog.h | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/shortlog.h b/shortlog.h\nindex de4f86f..54bc07c 100644\n--- a/shortlog.h\n+++ b/shortlog.h\n@@ -19,6 +19,8 @@ struct shortlog {\n \tstruct string_list mailmap;\n };\n \n+struct commit;\n+\n void shortlog_init(struct shortlog *log);\n \n void shortlog_add_commit(struct shortlog *log, struct commit *commit);\n-- \n1.8.4-fc\n"},{"id":"228851","messageId":"1381561636-20717-14-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 11/20] symbolic-ref: trivial style fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:09Z","receivedAt":"2013-10-12T07:07:09Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin/symbolic-ref.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c\nindex f481959..71286b4 100644\n--- a/builtin/symbolic-ref.c\n+++ b/builtin/symbolic-ref.c\n@@ -47,7 +47,7 @@ int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)\n \tgit_config(git_default_config, NULL);\n \targc = parse_options(argc, argv, prefix, options,\n \t\t\t     git_symbolic_ref_usage, 0);\n-\tif (msg &&!*msg)\n+\tif (msg && !*msg)\n \t\tdie(\"Refusing to perform update with empty message\");\n \n \tif (delete) {\n-- \n1.8.4-fc\n"},{"id":"228852","messageId":"1381561636-20717-15-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 06/20] revision: add missing include","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:10Z","receivedAt":"2013-10-12T07:07:10Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Otherwise we might not have 'struct diff_options'.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n revision.h | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/revision.h b/revision.h\nindex e7f1d21..89132df 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -5,6 +5,7 @@\n #include \"grep.h\"\n #include \"notes.h\"\n #include \"commit.h\"\n+#include \"diff.h\"\n \n #define SEEN\t\t(1u<<0)\n #define UNINTERESTING   (1u<<1)\n-- \n1.8.4-fc\n"},{"id":"228853","messageId":"1381561636-20717-16-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 18/20] run-command: trivial style fixes","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:11Z","receivedAt":"2013-10-12T07:07:11Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n run-command.c | 13 +++++--------\n 1 file changed, 5 insertions(+), 8 deletions(-)\n\ndiff --git a/run-command.c b/run-command.c\nindex 1b7f88e..3914d9c 100644\n--- a/run-command.c\n+++ b/run-command.c\n@@ -406,13 +406,12 @@ fail_pipe:\n \t\t\t\t\tunsetenv(*cmd->env);\n \t\t\t}\n \t\t}\n-\t\tif (cmd->git_cmd) {\n+\t\tif (cmd->git_cmd)\n \t\t\texecv_git_cmd(cmd->argv);\n-\t\t} else if (cmd->use_shell) {\n+\t\telse if (cmd->use_shell)\n \t\t\texecv_shell_cmd(cmd->argv);\n-\t\t} else {\n+\t\telse\n \t\t\tsane_execvp(cmd->argv[0], (char *const*) cmd->argv);\n-\t\t}\n \t\tif (errno == ENOENT) {\n \t\t\tif (!cmd->silent_exec_failure)\n \t\t\t\terror(\"cannot run %s: %s\", cmd->argv[0],\n@@ -446,7 +445,6 @@ fail_pipe:\n \t\tcmd->pid = -1;\n \t}\n \tclose(notify_pipe[0]);\n-\n }\n #else\n {\n@@ -480,11 +478,10 @@ fail_pipe:\n \tif (cmd->env)\n \t\tenv = make_augmented_environ(cmd->env);\n \n-\tif (cmd->git_cmd) {\n+\tif (cmd->git_cmd)\n \t\tcmd->argv = prepare_git_cmd(cmd->argv);\n-\t} else if (cmd->use_shell) {\n+\telse if (cmd->use_shell)\n \t\tcmd->argv = prepare_shell_cmd(cmd->argv);\n-\t}\n \n \tcmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env, cmd->dir,\n \t\t\t\t  fhin, fhout, fherr);\n-- \n1.8.4-fc\n"},{"id":"228854","messageId":"1381561636-20717-17-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 02/20] t: replace pulls with merges","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:12Z","receivedAt":"2013-10-12T07:07:12Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"This is what the code intended.\n\nNo functional changes.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n t/annotate-tests.sh                    | 2 +-\n t/t4200-rerere.sh                      | 2 +-\n t/t9114-git-svn-dcommit-merge.sh       | 2 +-\n t/t9500-gitweb-standalone-no-errors.sh | 2 +-\n 4 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/annotate-tests.sh b/t/annotate-tests.sh\nindex 99caa42..c9d105d 100644\n--- a/t/annotate-tests.sh\n+++ b/t/annotate-tests.sh\n@@ -92,7 +92,7 @@ test_expect_success 'blame 2 authors + 1 branch2 author' '\n '\n \n test_expect_success 'merge branch1 & branch2' '\n-\tgit pull . branch1\n+\tgit merge branch1\n '\n \n test_expect_success 'blame 2 authors + 2 merged-in authors' '\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex 7f6666f..cf19eb7 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -172,7 +172,7 @@ test_expect_success 'first postimage wins' '\n \tgit show second^:a1 | sed \"s/To die: t/To die! T/\" >a1 &&\n \tgit commit -q -a -m third &&\n \n-\ttest_must_fail git pull . first &&\n+\ttest_must_fail git merge first &&\n \t# rerere kicked in\n \t! grep \"^=======\\$\" a1 &&\n \ttest_cmp expect a1\ndiff --git a/t/t9114-git-svn-dcommit-merge.sh b/t/t9114-git-svn-dcommit-merge.sh\nindex f524d2f..d33d714 100755\n--- a/t/t9114-git-svn-dcommit-merge.sh\n+++ b/t/t9114-git-svn-dcommit-merge.sh\n@@ -62,7 +62,7 @@ test_expect_success 'setup git mirror and merge' '\n \techo friend > README &&\n \tcat tmp >> README &&\n \tgit commit -a -m \"friend\" &&\n-\tgit pull . merge\n+\tgit merge merge\n \t'\n \n test_debug 'gitk --all & sleep 1'\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex 6fca193..3864388 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -328,7 +328,7 @@ test_expect_success \\\n \t git add b &&\n \t git commit -a -m \"On branch\" &&\n \t git checkout master &&\n-\t git pull . b &&\n+\t git merge b &&\n \t git tag merge_commit'\n \n test_expect_success \\\n-- \n1.8.4-fc\n"},{"id":"228855","messageId":"1381561636-20717-18-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 12/20] alias: trivial style fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:13Z","receivedAt":"2013-10-12T07:07:13Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n alias.c | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/alias.c b/alias.c\nindex eb9f08b..9938f03 100644\n--- a/alias.c\n+++ b/alias.c\n@@ -5,7 +5,7 @@ static char *alias_val;\n \n static int alias_lookup_cb(const char *k, const char *v, void *cb)\n {\n-\tif (!prefixcmp(k, \"alias.\") && !strcmp(k+6, alias_key)) {\n+\tif (!prefixcmp(k, \"alias.\") && !strcmp(k + 6, alias_key)) {\n \t\tif (!v)\n \t\t\treturn config_error_nonbool(k);\n \t\talias_val = xstrdup(v);\n@@ -34,7 +34,7 @@ int split_cmdline(char *cmdline, const char ***argv)\n \tint src, dst, count = 0, size = 16;\n \tchar quoted = 0;\n \n-\t*argv = xmalloc(sizeof(char *) * size);\n+\t*argv = xmalloc(sizeof(**argv) * size);\n \n \t/* split alias_string */\n \t(*argv)[count++] = cmdline;\n@@ -45,7 +45,7 @@ int split_cmdline(char *cmdline, const char ***argv)\n \t\t\twhile (cmdline[++src]\n \t\t\t\t\t&& isspace(cmdline[src]))\n \t\t\t\t; /* skip */\n-\t\t\tALLOC_GROW(*argv, count+1, size);\n+\t\t\tALLOC_GROW(*argv, count + 1, size);\n \t\t\t(*argv)[count++] = cmdline + dst;\n \t\t} else if (!quoted && (c == '\\'' || c == '\"')) {\n \t\t\tquoted = c;\n@@ -76,12 +76,13 @@ int split_cmdline(char *cmdline, const char ***argv)\n \t\treturn -SPLIT_CMDLINE_UNCLOSED_QUOTE;\n \t}\n \n-\tALLOC_GROW(*argv, count+1, size);\n+\tALLOC_GROW(*argv, count + 1, size);\n \t(*argv)[count] = NULL;\n \n \treturn count;\n }\n \n-const char *split_cmdline_strerror(int split_cmdline_errno) {\n-\treturn split_cmdline_errors[-split_cmdline_errno-1];\n+const char *split_cmdline_strerror(int split_cmdline_errno)\n+{\n+\treturn split_cmdline_errors[-split_cmdline_errno - 1];\n }\n-- \n1.8.4-fc\n"},{"id":"228856","messageId":"1381561636-20717-19-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 04/20] fetch: add missing documentation","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:14Z","receivedAt":"2013-10-12T07:07:14Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"There's no mention of the 'origin' default, or the fact that the\nupstream tracking branch remote is used.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Documentation/git-fetch.txt | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt\nindex e08a028..7e75dc4 100644\n--- a/Documentation/git-fetch.txt\n+++ b/Documentation/git-fetch.txt\n@@ -37,6 +37,9 @@ or from several repositories at once if <group> is given and\n there is a remotes.<group> entry in the configuration file.\n (See linkgit:git-config[1]).\n \n+When no remote is specified, by the default the `origin` remote will be used,\n+unless there's an upstream branch configured for the current branch.\n+\n OPTIONS\n -------\n include::fetch-options.txt[]\n-- \n1.8.4-fc\n"},{"id":"228858","messageId":"1381561636-20717-20-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 09/20] sha1-name: trivial style cleanup","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:15Z","receivedAt":"2013-10-12T07:07:15Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n sha1_name.c | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/sha1_name.c b/sha1_name.c\nindex 0e5fe7f..e9c2999 100644\n--- a/sha1_name.c\n+++ b/sha1_name.c\n@@ -343,7 +343,6 @@ static int get_short_sha1(const char *name, int len, unsigned char *sha1,\n \treturn status;\n }\n \n-\n int for_each_abbrev(const char *prefix, each_abbrev_fn fn, void *cb_data)\n {\n \tchar hex_pfx[40];\n-- \n1.8.4-fc\n"},{"id":"228861","messageId":"1381561636-20717-21-git-send-email-felipe.contreras@gmail.com","threadId":"35126","inReplyTo":"1381561636-20717-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 14/20] describe: trivial style fixes","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T07:07:16Z","receivedAt":"2013-10-12T07:07:16Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n builtin/describe.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/describe.c b/builtin/describe.c\nindex b9d3603..6f62109 100644\n--- a/builtin/describe.c\n+++ b/builtin/describe.c\n@@ -9,7 +9,7 @@\n #include \"hash.h\"\n #include \"argv-array.h\"\n \n-#define SEEN\t\t(1u<<0)\n+#define SEEN\t\t(1u << 0)\n #define MAX_TAGS\t(FLAG_BITS - 1)\n \n static const char * const describe_usage[] = {\n@@ -36,7 +36,6 @@ static const char *diff_index_args[] = {\n \t\"diff-index\", \"--quiet\", \"HEAD\", \"--\", NULL\n };\n \n-\n struct commit_name {\n \tstruct commit_name *next;\n \tunsigned char peeled[20];\n@@ -46,6 +45,7 @@ struct commit_name {\n \tunsigned char sha1[20];\n \tchar *path;\n };\n+\n static const char *prio_names[] = {\n \t\"head\", \"lightweight\", \"annotated\",\n };\n@@ -488,9 +488,8 @@ int cmd_describe(int argc, const char **argv, const char *prefix)\n \t} else if (dirty) {\n \t\tdie(_(\"--dirty is incompatible with commit-ishes\"));\n \t} else {\n-\t\twhile (argc-- > 0) {\n+\t\twhile (argc-- > 0)\n \t\t\tdescribe(*argv++, argc == 0);\n-\t\t}\n \t}\n \treturn 0;\n }\n-- \n1.8.4-fc\n"},{"id":"228872","messageId":"52590E97.6060308@googlemail.com","threadId":"35126","inReplyTo":"1381561636-20717-18-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH 12/20] alias: trivial style fix","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-10-12T08:55:51Z","receivedAt":"2013-10-12T08:55:51Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On 10/12/2013 09:07 AM, Felipe Contreras wrote:\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\nNot sure if it's worth by a newcomer. ;)\n\nReviewed-by:  Stefan Beller <stefanbeller@googlemail.com>\n\n> ---\n>  alias.c | 13 +++++++------\n>  1 file changed, 7 insertions(+), 6 deletions(-)\n> \n> diff --git a/alias.c b/alias.c\n> index eb9f08b..9938f03 100644\n> --- a/alias.c\n> +++ b/alias.c\n> @@ -5,7 +5,7 @@ static char *alias_val;\n>  \n>  static int alias_lookup_cb(const char *k, const char *v, void *cb)\n>  {\n> -\tif (!prefixcmp(k, \"alias.\") && !strcmp(k+6, alias_key)) {\n> +\tif (!prefixcmp(k, \"alias.\") && !strcmp(k + 6, alias_key)) {\n>  \t\tif (!v)\n>  \t\t\treturn config_error_nonbool(k);\n>  \t\talias_val = xstrdup(v);\n> @@ -34,7 +34,7 @@ int split_cmdline(char *cmdline, const char ***argv)\n>  \tint src, dst, count = 0, size = 16;\n>  \tchar quoted = 0;\n>  \n> -\t*argv = xmalloc(sizeof(char *) * size);\n> +\t*argv = xmalloc(sizeof(**argv) * size);\n>  \n>  \t/* split alias_string */\n>  \t(*argv)[count++] = cmdline;\n> @@ -45,7 +45,7 @@ int split_cmdline(char *cmdline, const char ***argv)\n>  \t\t\twhile (cmdline[++src]\n>  \t\t\t\t\t&& isspace(cmdline[src]))\n>  \t\t\t\t; /* skip */\n> -\t\t\tALLOC_GROW(*argv, count+1, size);\n> +\t\t\tALLOC_GROW(*argv, count + 1, size);\n>  \t\t\t(*argv)[count++] = cmdline + dst;\n>  \t\t} else if (!quoted && (c == '\\'' || c == '\"')) {\n>  \t\t\tquoted = c;\n> @@ -76,12 +76,13 @@ int split_cmdline(char *cmdline, const char ***argv)\n>  \t\treturn -SPLIT_CMDLINE_UNCLOSED_QUOTE;\n>  \t}\n>  \n> -\tALLOC_GROW(*argv, count+1, size);\n> +\tALLOC_GROW(*argv, count + 1, size);\n>  \t(*argv)[count] = NULL;\n>  \n>  \treturn count;\n>  }\n>  \n> -const char *split_cmdline_strerror(int split_cmdline_errno) {\n> -\treturn split_cmdline_errors[-split_cmdline_errno-1];\n> +const char *split_cmdline_strerror(int split_cmdline_errno)\n> +{\n> +\treturn split_cmdline_errors[-split_cmdline_errno - 1];\n>  }\n> \n"},{"id":"228873","messageId":"52591180.3010103@googlemail.com","threadId":"35126","inReplyTo":"1381561636-20717-10-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH 16/20] revision: trivial style fixes","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-10-12T09:08:16Z","receivedAt":"2013-10-12T09:08:16Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On 10/12/2013 09:07 AM, Felipe Contreras wrote:\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>  revision.c | 14 ++++++--------\n>  1 file changed, 6 insertions(+), 8 deletions(-)\n> \n> diff --git a/revision.c b/revision.c\n> index 0173e01..4049867 100644\n> --- a/revision.c\n> +++ b/revision.c\n> @@ -1503,7 +1503,7 @@ struct cmdline_pathspec {\n>  static void append_prune_data(struct cmdline_pathspec *prune, const char **av)\n>  {\n>  \twhile (*av) {\n> -\t\tALLOC_GROW(prune->path, prune->nr+1, prune->alloc);\n> +\t\tALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);\n>  \t\tprune->path[prune->nr++] = *(av++);\n>  \t}\n>  }\n> @@ -1515,7 +1515,7 @@ static void read_pathspec_from_stdin(struct rev_info *revs, struct strbuf *sb,\n>  \t\tint len = sb->len;\n>  \t\tif (len && sb->buf[len - 1] == '\\n')\n>  \t\t\tsb->buf[--len] = '\\0';\n> -\t\tALLOC_GROW(prune->path, prune->nr+1, prune->alloc);\n> +\t\tALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);\n>  \t\tprune->path[prune->nr++] = xstrdup(sb->buf);\n>  \t}\n>  }\n> @@ -2118,7 +2118,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s\n>  \t\t *\tcall init_pathspec() to set revs->prune_data here.\n>  \t\t * }\n>  \t\t */\n> -\t\tALLOC_GROW(prune_data.path, prune_data.nr+1, prune_data.alloc);\n> +\t\tALLOC_GROW(prune_data.path, prune_data.nr + 1, prune_data.alloc);\n>  \t\tprune_data.path[prune_data.nr++] = NULL;\n>  \t\tparse_pathspec(&revs->prune_data, 0, 0,\n>  \t\t\t       revs->prefix, prune_data.path);\n> @@ -2971,7 +2971,7 @@ static struct commit *get_revision_internal(struct rev_info *revs)\n>  \tif (revs->max_count) {\n>  \t\tc = get_revision_1(revs);\n>  \t\tif (c) {\n> -\t\t\twhile (0 < revs->skip_count) {\n> +\t\t\twhile (revs->skip_count > 0) {\n>  \t\t\t\trevs->skip_count--;\n>  \t\t\t\tc = get_revision_1(revs);\n>  \t\t\t\tif (!c)\n> @@ -2986,9 +2986,8 @@ static struct commit *get_revision_internal(struct rev_info *revs)\n>  \tif (c)\n>  \t\tc->object.flags |= SHOWN;\n>  \n> -\tif (!revs->boundary) {\n> +\tif (!revs->boundary)\n>  \t\treturn c;\n> -\t}\n>  \n>  \tif (!c) {\n>  \t\t/*\n> @@ -3034,9 +3033,8 @@ struct commit *get_revision(struct rev_info *revs)\n>  \n>  \tif (revs->reverse) {\n>  \t\treversed = NULL;\n> -\t\twhile ((c = get_revision_internal(revs))) {\n> +\t\twhile ((c = get_revision_internal(revs)))\n>  \t\t\tcommit_list_insert(c, &reversed);\n> -\t\t}\n\nWhile talking about trivia, what is the projects stance on\nsuch constructs here?\n\twhile (foo)\n\t\tbar();\n\tfoobar();\n\nI've seen an empty line between the bar(); and the foobar(); often, which suits readability.\nWhat's the stance on such an empty line here?\n\n>  \t\trevs->commits = reversed;\n>  \t\trevs->reverse = 0;\n>  \t\trevs->reverse_output_stage = 1;\n> \n\nThanks,\nStefan\n"},{"id":"228877","messageId":"52593012d7d28_5f30b31e74588ea@nysa.mail","threadId":"35126","inReplyTo":"52591180.3010103@googlemail.com","subject":"Re: [PATCH 16/20] revision: trivial style fixes","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-12T11:18:42Z","receivedAt":"2013-10-12T11:18:42Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Stefan Beller wrote:\n> While talking about trivia, what is the projects stance on\n> such constructs here?\n> \twhile (foo)\n> \t\tbar();\n> \tfoobar();\n> \n> I've seen an empty line between the bar(); and the foobar(); often, which suits readability.\n> What's the stance on such an empty line here?\n\nI don't think there's any guideline on that. Personally I choose depending on\nthe context.\n\n----\nvoid test(void)\n{\n \twhile (foo)\n \t\tbar();\n \tfoobar();\n}\n----\n\n----\n\twhile (meh) {\n\t\t/*\n\t\t * bunch of stuff\n\t\t */\n\t}\n\t\n \twhile (foo)\n \t\tbar();\n\n \tfoobar();\n----\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"228928","messageId":"20131014141806.GB21200@google.com","threadId":"35126","inReplyTo":"52590E97.6060308@googlemail.com","subject":"Re: [PATCH 12/20] alias: trivial style fix","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-10-14T14:18:06Z","receivedAt":"2013-10-14T14:18:06Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Stefan Beller wrote:\n> On 10/12/2013 09:07 AM, Felipe Contreras wrote:\n\n>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n>\n> Not sure if it's worth by a newcomer. ;)\n\nA second set of eyes is always welcome.\n\nMy thoughts: I have to admit I don't see much value in mechanical\nreplacements like this one when done piecemeal and without other more\nsignificant changes on top.  If this was fixing some particular\neyesore, I would understand, and a little preparatory cleanup to make\nanother patch on top more readable is always welcome, but this kind of\nthing:\n\n>> --- a/alias.c\n>> +++ b/alias.c\n>> @@ -5,7 +5,7 @@ static char *alias_val;\n>>  \n>>  static int alias_lookup_cb(const char *k, const char *v, void *cb)\n>>  {\n>> -\tif (!prefixcmp(k, \"alias.\") && !strcmp(k+6, alias_key)) {\n>> +\tif (!prefixcmp(k, \"alias.\") && !strcmp(k + 6, alias_key)) {\n\ndoes not look worth the churn and mailing list noise to me.\n\nA patch that globally took care of these var+constant constructs\nwithout surrounding space and did nothing else, once and for all to\navoid later noise, may or may not be useful.  I suspect even that\nwouldn't be worth it, since \"k+6\" already seems perfectly readable.\n\nSo, not too excited by this change.\n\nHope that helps,\nJonathan\n"},{"id":"228947","messageId":"525c6067716ea_197a905e84a2@nysa.notmuch","threadId":"35126","inReplyTo":"20131014141806.GB21200@google.com","subject":"Re: [PATCH 12/20] alias: trivial style fix","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-10-14T21:21:43Z","receivedAt":"2013-10-14T21:21:43Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Jonathan Nieder wrote:\n> Stefan Beller wrote:\n> > On 10/12/2013 09:07 AM, Felipe Contreras wrote:\n> \n> >> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> >\n> > Not sure if it's worth by a newcomer. ;)\n> \n> A second set of eyes is always welcome.\n> \n> My thoughts: I have to admit I don't see much value in mechanical\n> replacements like this one when done piecemeal and without other more\n> significant changes on top.\n\nA code-style fix is a code-style fix. If you don't send and apply code-style\nfixes, your code would remain forever inconsistent, and not following the\nstyle.\n\nIt's interesting how the most successfull project in history has a different\ntake on this:\n\nhttp://article.gmane.org/gmane.linux.acpi.devel/42407\n\nhttps://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=915ea7e41439efa7793814cdf4338cb6b003538a\nhttps://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=21fcb34e28e99291e91d83422f2824f11b3c9ce9\nhttps://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=28ee793e7ad4a00e41c6267075501694c94451fb\n\n> >> --- a/alias.c\n> >> +++ b/alias.c\n> >> @@ -5,7 +5,7 @@ static char *alias_val;\n> >>  \n> >>  static int alias_lookup_cb(const char *k, const char *v, void *cb)\n> >>  {\n> >> -\tif (!prefixcmp(k, \"alias.\") && !strcmp(k+6, alias_key)) {\n> >> +\tif (!prefixcmp(k, \"alias.\") && !strcmp(k + 6, alias_key)) {\n> \n> does not look worth the churn and mailing list noise to me.\n> \n> A patch that globally took care of these var+constant constructs\n> without surrounding space and did nothing else, once and for all to\n> avoid later noise, may or may not be useful.  I suspect even that\n> wouldn't be worth it, since \"k+6\" already seems perfectly readable.\n\nThis comes from the Linux kernel code-style:\n\n----\nUse one space around (on each side of) most binary and ternary operators,\nsuch as any of these:\n\n\t=  +  -  <  >  *  /  %  |  &  ^  <=  >=  ==  !=  ?  :\n----\n\nSo no, to me and a huge lot of developers it's not \"perfectly readable\".\n\n-- \nFelipe Contreras\n"}]}