]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Fix various issues found in comments
authorElijah Newren <newren@gmail.com>
Tue, 8 Jun 2021 16:11:41 +0000 (16:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Jun 2021 02:40:04 +0000 (11:40 +0900)
A random hodge-podge of incorrect or out-of-date comments that I found:

  * t6423 had a comment that has referred to the wrong test for years;
    fix it to refer to the right one.
  * diffcore-rename had a FIXME comment meant to remind myself to
    investigate if I could make another code change.  I later
    investigated and removed the FIXME, but while cherry-picking the
    patch to submit upstream I missed the later update.  Remove the
    comment now.
  * merge-ort had the early part of a comment for a function; I had
    meant to include the more involved description when I updated the
    function.  Update the comment now.

Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diffcore-rename.c
merge-ort.c
t/t6423-merge-rename-directories.sh

index 9c0bc5afb4091353686fb1862421d6bc51846a3f..eb77e5c4f027166f224be271ac57d56526e03f54 100644 (file)
@@ -1544,7 +1544,7 @@ void diffcore_rename_extended(struct diff_options *options,
                        /* all the usual ones need to be kept */
                        diff_q(&outq, p);
                else
-                       /* no need to keep unmodified pairs; FIXME: remove earlier? */
+                       /* no need to keep unmodified pairs */
                        pair_to_free = p;
 
                if (pair_to_free)
index be80143f4db276872d3648af588c7556528f9afb..a3bb3e113270bf1e804d155d018233defba92d4b 100644 (file)
@@ -2533,7 +2533,7 @@ static int compare_pairs(const void *a_, const void *b_)
        return strcmp(a->one->path, b->one->path);
 }
 
-/* Call diffcore_rename() to compute which files have changed on given side */
+/* Call diffcore_rename() to update deleted/added pairs into rename pairs */
 static void detect_regular_renames(struct merge_options *opt,
                                   unsigned side_index)
 {
@@ -2586,8 +2586,10 @@ static void detect_regular_renames(struct merge_options *opt,
 }
 
 /*
- * Get information of all renames which occurred in 'side_pairs', discarding
- * non-renames.
+ * Get information of all renames which occurred in 'side_pairs', making use
+ * of any implicit directory renames in side_dir_renames (also making use of
+ * implicit directory renames rename_exclusions as needed by
+ * check_for_directory_rename()).  Add all (updated) renames into result.
  */
 static int collect_renames(struct merge_options *opt,
                           struct diff_queue_struct *result,
index 3037c5c9bf479fdb27168b76c8538beb1135c715..85d947dd275875eb60a3ebe24bfd8919b4c0577b 100755 (executable)
@@ -454,7 +454,7 @@ test_expect_success '1f: Split a directory into two other directories' '
 #   the directory renamed, but the files within it. (see 1b)
 #
 #   If renames split a directory into two or more others, the directory
-#   with the most renames, "wins" (see 1c).  However, see the testcases
+#   with the most renames, "wins" (see 1f).  However, see the testcases
 #   in section 2, plus testcases 3a and 4a.
 ###########################################################################