git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Elijah Newren <newren@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/5] merge-recursive: clarify the rename_dir/RENAME_DIR meaning
Date: Mon, 21 May 2018 16:28:24 +0200 (DST)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.1805211626240.77@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20180519020700.2241-4-newren@gmail.com>

Hi Elijah,

On Fri, 18 May 2018, Elijah Newren wrote:

> We had an enum of rename types which included RENAME_DIR; this name felt
> misleading since it was not about an entire directory but was a status for
> each individual file add that occurred within a renamed directory.  Since
> this type is for signifying that the files in question were being renamed
> due to directory rename detection, rename this enum value to
> RENAME_VIA_DIR.  Make a similar change to the conflict_rename_dir()
> function, and add a comment to the top of that function explaining its
> purpose (it may not be quite as obvious as for the other
> conflict_rename_*() functions).
> 
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---

Make sense. I think the reading flow could be improved a little bit by
splitting this paragraph into three.

> diff --git a/merge-recursive.c b/merge-recursive.c
> index 01306c87eb..d30085d9c7 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> -static int conflict_rename_dir(struct merge_options *o,
> -			       struct diff_filepair *pair,
> -			       const char *rename_branch,
> -			       const char *other_branch)
> +static int conflict_rename_via_dir(struct merge_options *o,
> +				   struct diff_filepair *pair,
> +				   const char *rename_branch,
> +				   const char *other_branch)
>  {
> +	/*
> +	 * Handle file adds that need to be renamed due to directory rename
> +	 * detection.  This differs from handle_rename_normal, because
> +	 * there is no content merge to do; just move the path into the

Technically, we do not move the path, but the file.

The rest of the diff looks obviously correct to me.

Thanks,
Dscho

  reply	other threads:[~2018-05-21 14:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-19  2:06 [PATCH 0/5] merge-recursive code cleanups Elijah Newren
2018-05-19  2:06 ` [PATCH 1/5] merge-recursive: fix miscellaneous grammar error in comment Elijah Newren
2018-05-19  2:06 ` [PATCH 2/5] merge-recursive: fix numerous argument alignment issues Elijah Newren
2018-05-21 13:42   ` Johannes Schindelin
2018-05-21 16:48     ` Elijah Newren
2018-05-19  2:06 ` [PATCH 3/5] merge-recursive: clarify the rename_dir/RENAME_DIR meaning Elijah Newren
2018-05-21 14:28   ` Johannes Schindelin [this message]
2018-05-19  2:06 ` [PATCH 4/5] merge-recursive: rename conflict_rename_*() family of functions Elijah Newren
2018-05-21 14:30   ` Johannes Schindelin
2018-05-19  2:07 ` [PATCH 5/5] merge-recursive: simplify handle_change_delete Elijah Newren
2018-05-19  7:32   ` Johannes Sixt
2018-05-19 15:39     ` Elijah Newren
2018-05-21 13:41       ` Johannes Schindelin
2018-05-21 17:22         ` Elijah Newren
2018-05-22  0:43 ` [PATCH v2 0/5] merge-recursive code cleanups Elijah Newren
2018-05-22  0:43   ` [PATCH v2 1/5] merge-recursive: fix miscellaneous grammar error in comment Elijah Newren
2018-05-22  0:43   ` [PATCH v2 2/5] merge-recursive: fix numerous argument alignment issues Elijah Newren
2018-05-22  0:43   ` [PATCH v2 3/5] merge-recursive: clarify the rename_dir/RENAME_DIR meaning Elijah Newren
2018-05-22  0:43   ` [PATCH v2 4/5] merge-recursive: rename conflict_rename_*() family of functions Elijah Newren
2018-05-22  0:43   ` [PATCH v2 5/5] merge-recursive: add pointer about unduly complex looking code Elijah Newren
2018-06-10  4:16   ` [PATCH v3 0/6] merge-recursive code cleanups Elijah Newren
2018-06-10  4:16     ` [PATCH v3 1/6] merge-recursive: fix miscellaneous grammar error in comment Elijah Newren
2018-06-10  4:16     ` [PATCH v3 2/6] merge-recursive: fix numerous argument alignment issues Elijah Newren
2018-06-10  4:16     ` [PATCH v3 3/6] merge-recursive: align labels with their respective code blocks Elijah Newren
2018-06-10  4:16     ` [PATCH v3 4/6] merge-recursive: clarify the rename_dir/RENAME_DIR meaning Elijah Newren
2018-06-10  4:16     ` [PATCH v3 5/6] merge-recursive: rename conflict_rename_*() family of functions Elijah Newren
2018-06-10  4:16     ` [PATCH v3 6/6] merge-recursive: add pointer about unduly complex looking code Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.1805211626240.77@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).