зеркало из https://github.com/microsoft/git.git
Merge branch 'jk/log-warn-on-bogus-encoding' into maint
Squelch over-eager warning message added during this cycle. * jk/log-warn-on-bogus-encoding: log: document --encoding behavior on iconv() failure Revert "logmsg_reencode(): warn when iconv() fails"
This commit is contained in:
Коммит
99c7db563f
|
@ -41,8 +41,8 @@ people using 80-column terminals.
|
||||||
in `X` and we are outputting in `X`, we will output the object
|
in `X` and we are outputting in `X`, we will output the object
|
||||||
verbatim; this means that invalid sequences in the original
|
verbatim; this means that invalid sequences in the original
|
||||||
commit may be copied to the output. Likewise, if iconv(3) fails
|
commit may be copied to the output. Likewise, if iconv(3) fails
|
||||||
to convert the commit, we will output the original object
|
to convert the commit, we will quietly output the original
|
||||||
verbatim, along with a warning.
|
object verbatim.
|
||||||
|
|
||||||
--expand-tabs=<n>::
|
--expand-tabs=<n>::
|
||||||
--expand-tabs::
|
--expand-tabs::
|
||||||
|
|
6
pretty.c
6
pretty.c
|
@ -671,11 +671,7 @@ const char *repo_logmsg_reencode(struct repository *r,
|
||||||
* If the re-encoding failed, out might be NULL here; in that
|
* If the re-encoding failed, out might be NULL here; in that
|
||||||
* case we just return the commit message verbatim.
|
* case we just return the commit message verbatim.
|
||||||
*/
|
*/
|
||||||
if (!out) {
|
return out ? out : msg;
|
||||||
warning("unable to reencode commit to '%s'", output_encoding);
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mailmap_name(const char **email, size_t *email_len,
|
static int mailmap_name(const char **email, size_t *email_len,
|
||||||
|
|
|
@ -131,11 +131,4 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
test_expect_success 'log shows warning when conversion fails' '
|
|
||||||
enc=this-encoding-does-not-exist &&
|
|
||||||
git log -1 --encoding=$enc 2>err &&
|
|
||||||
echo "warning: unable to reencode commit to ${SQ}${enc}${SQ}" >expect &&
|
|
||||||
test_cmp expect err
|
|
||||||
'
|
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Загрузка…
Ссылка в новой задаче