shortlog: support outputting to streams other than stdout
[gitweb.git] / sequencer.c
index e60e75ad749a18a3c12d95475f95e67e455ab371..4687ad4b80bf651fd9dab66916681b71f7a6e31d 100644 (file)
@@ -875,9 +875,8 @@ static int sequencer_rollback(struct replay_opts *opts)
                return rollback_single_pick();
        }
        if (!f)
-               return error(_("cannot open %s: %s"), git_path_head_file(),
-                                               strerror(errno));
-       if (strbuf_getline(&buf, f, '\n')) {
+               return error_errno(_("cannot open %s"), git_path_head_file());
+       if (strbuf_getline_lf(&buf, f)) {
                error(_("cannot read %s: %s"), git_path_head_file(),
                      ferror(f) ?  strerror(errno) : _("unexpected end of file"));
                fclose(f);