]> git.ipfire.org Git - thirdparty/git.git/blobdiff - revision.c
Git 1.8.3-rc0
[thirdparty/git.git] / revision.c
index cf620c6b3693e2d18b2cacd33574a03b34e4c48e..a67b615bfc7001ac28e339db1d91ea46a1b125b5 100644 (file)
@@ -1276,7 +1276,8 @@ static void read_revisions_from_stdin(struct rev_info *revs,
                        }
                        die("options not supported in --stdin mode");
                }
-               if (handle_revision_arg(sb.buf, revs, 0, REVARG_CANNOT_BE_FILENAME))
+               if (handle_revision_arg(xstrdup(sb.buf), revs, 0,
+                                       REVARG_CANNOT_BE_FILENAME))
                        die("bad revision '%s'", sb.buf);
        }
        if (seen_dashdash)
@@ -2022,10 +2023,11 @@ static struct commit_list **simplify_one(struct rev_info *revs, struct commit *c
                if (revs->first_parent_only)
                        break;
        }
-       if (!revs->first_parent_only)
-               cnt = remove_duplicate_parents(commit);
-       else
+
+       if (revs->first_parent_only)
                cnt = 1;
+       else
+               cnt = remove_duplicate_parents(commit);
 
        /*
         * It is possible that we are a merge and one side branch
@@ -2290,7 +2292,7 @@ static int commit_match(struct commit *commit, struct rev_info *opt)
         * in it.
         */
        encoding = get_log_output_encoding();
-       message = logmsg_reencode(commit, encoding);
+       message = logmsg_reencode(commit, NULL, encoding);
 
        /* Copy the commit to temporary if we are using "fake" headers */
        if (buf.len)