Re: [PATCH 2/5] merge-recursive: fix numerous argument alignment issues

2018-05-21 Thread Elijah Newren
Hi Dscho,

On Mon, May 21, 2018 at 6:42 AM, Johannes Schindelin
 wrote:
> Hi Elijah,
>
> On Fri, 18 May 2018, Elijah Newren wrote:
>
>> Various refactorings throughout the code have left lots of alignment
>> issues that were driving me crazy; fix them.
>
> I hope you did not do that manually. What is your code formatting tool of
> choice?

Sorry to disappoint but it was manual.  I noticed and fixed one of
them many months ago, tossing it into a 'misc' branch.  Then ran
across another and added it.  When I hit the third, I was annoyed and
cleaned them all up -- and combined them with other changes into this
series.

However, it's hard to call this formatting entirely manual.  A quick
regex found the relevant sites pretty easily, and 'M-x indent-region'
(emacs) fixes the indentation for a block of lines all at once.  I
guess if I had taken the time to fix a few other emacs formatting
rules, I could have highlighted the whole file and ran C-M-\ (a.k.a.
indent-region), but didn't.

> The patch looks obviously good to me.

Thanks for taking a look!


Re: [PATCH 2/5] merge-recursive: fix numerous argument alignment issues

2018-05-21 Thread Johannes Schindelin
Hi Elijah,

On Fri, 18 May 2018, Elijah Newren wrote:

> Various refactorings throughout the code have left lots of alignment
> issues that were driving me crazy; fix them.

I hope you did not do that manually. What is your code formatting tool of
choice?

The patch looks obviously good to me.

Ciao,
Dscho


[PATCH 2/5] merge-recursive: fix numerous argument alignment issues

2018-05-18 Thread Elijah Newren
Various refactorings throughout the code have left lots of alignment
issues that were driving me crazy; fix them.

Signed-off-by: Elijah Newren 
---
 merge-recursive.c | 47 ---
 1 file changed, 24 insertions(+), 23 deletions(-)

diff --git a/merge-recursive.c b/merge-recursive.c
index c430fd72bc..01306c87eb 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -308,8 +308,8 @@ static void output_commit_title(struct merge_options *o, 
struct commit *commit)
 }
 
 static int add_cacheinfo(struct merge_options *o,
-   unsigned int mode, const struct object_id *oid,
-   const char *path, int stage, int refresh, int options)
+unsigned int mode, const struct object_id *oid,
+const char *path, int stage, int refresh, int options)
 {
struct cache_entry *ce;
int ret;
@@ -409,8 +409,8 @@ struct tree *write_tree_from_memory(struct merge_options *o)
 }
 
 static int save_files_dirs(const struct object_id *oid,
-   struct strbuf *base, const char *path,
-   unsigned int mode, int stage, void *context)
+  struct strbuf *base, const char *path,
+  unsigned int mode, int stage, void *context)
 {
struct path_hashmap_entry *entry;
int baselen = base->len;
@@ -1257,13 +1257,13 @@ static int conflict_rename_dir(struct merge_options *o,
 }
 
 static int handle_change_delete(struct merge_options *o,
-const char *path, const char *old_path,
-const struct object_id *o_oid, int o_mode,
-const struct object_id *changed_oid,
-int changed_mode,
-const char *change_branch,
-const char *delete_branch,
-const char *change, const char *change_past)
+   const char *path, const char *old_path,
+   const struct object_id *o_oid, int o_mode,
+   const struct object_id *changed_oid,
+   int changed_mode,
+   const char *change_branch,
+   const char *delete_branch,
+   const char *change, const char *change_past)
 {
char *alt_path = NULL;
const char *update_path = path;
@@ -1324,9 +1324,9 @@ static int handle_change_delete(struct merge_options *o,
 }
 
 static int conflict_rename_delete(struct merge_options *o,
-  struct diff_filepair *pair,
-  const char *rename_branch,
-  const char *delete_branch)
+ struct diff_filepair *pair,
+ const char *rename_branch,
+ const char *delete_branch)
 {
const struct diff_filespec *orig = pair->one;
const struct diff_filespec *dest = pair->two;
@@ -1429,7 +1429,7 @@ static int handle_file(struct merge_options *o,
 }
 
 static int conflict_rename_rename_1to2(struct merge_options *o,
-   struct rename_conflict_info *ci)
+  struct rename_conflict_info *ci)
 {
/* One file was renamed in both branches, but to different names. */
struct diff_filespec *one = ci->pair1->one;
@@ -1491,7 +1491,7 @@ static int conflict_rename_rename_1to2(struct 
merge_options *o,
 }
 
 static int conflict_rename_rename_2to1(struct merge_options *o,
-   struct rename_conflict_info *ci)
+  struct rename_conflict_info *ci)
 {
/* Two files, a & b, were renamed to the same thing, c. */
struct diff_filespec *a = ci->pair1->one;
@@ -2710,7 +2710,8 @@ static struct object_id *stage_oid(const struct object_id 
*oid, unsigned mode)
 }
 
 static int read_oid_strbuf(struct merge_options *o,
-   const struct object_id *oid, struct strbuf *dst)
+  const struct object_id *oid,
+  struct strbuf *dst)
 {
void *buf;
enum object_type type;
@@ -2763,10 +2764,10 @@ static int blob_unchanged(struct merge_options *opt,
 }
 
 static int handle_modify_delete(struct merge_options *o,
-const char *path,
-struct object_id *o_oid, int o_mode,
-struct object_id *a_oid, int a_mode,
-struct object_id *b_oid, int b_mode)
+   const char *path,
+   struct object_id *o_oid, int o_mode,
+   struct object_id *a_oid, int a_mode,
+