зеркало из https://github.com/microsoft/git.git
clone: use xfopen() instead of fopen()
copy_alternates() called fopen() without handling errors. By switching to xfopen(), this bug is fixed. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
23a9e0712d
Коммит
02912f4775
|
@ -357,7 +357,7 @@ static void copy_alternates(struct strbuf *src, struct strbuf *dst,
|
||||||
* to turn entries with paths relative to the original
|
* to turn entries with paths relative to the original
|
||||||
* absolute, so that they can be used in the new repository.
|
* absolute, so that they can be used in the new repository.
|
||||||
*/
|
*/
|
||||||
FILE *in = fopen(src->buf, "r");
|
FILE *in = xfopen(src->buf, "r");
|
||||||
struct strbuf line = STRBUF_INIT;
|
struct strbuf line = STRBUF_INIT;
|
||||||
|
|
||||||
while (strbuf_getline(&line, in) != EOF) {
|
while (strbuf_getline(&line, in) != EOF) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче