Skip to content

Commit fa2376f

Browse files
author
Junio C Hamano
committed
Merge branch 'maint'
* maint: Clarify fetch error for missing objects. Move Fink and Ports check to after config file Conflicts: Makefile
2 parents c93be3b + 0d7a6e4 commit fa2376f

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

Makefile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,6 @@ ifeq ($(uname_S),Darwin)
326326
NEEDS_SSL_WITH_CRYPTO = YesPlease
327327
NEEDS_LIBICONV = YesPlease
328328
NO_STRLCPY = YesPlease
329-
ifndef NO_FINK
330-
ifeq ($(shell test -d /sw/lib && echo y),y)
331-
BASIC_CFLAGS += -I/sw/include
332-
BASIC_LDFLAGS += -L/sw/lib
333-
endif
334-
endif
335-
ifndef NO_DARWIN_PORTS
336-
ifeq ($(shell test -d /opt/local/lib && echo y),y)
337-
BASIC_CFLAGS += -I/opt/local/include
338-
BASIC_LDFLAGS += -L/opt/local/lib
339-
endif
340-
endif
341329
endif
342330
ifeq ($(uname_S),SunOS)
343331
NEEDS_SOCKET = YesPlease
@@ -415,6 +403,21 @@ endif
415403
-include config.mak.autogen
416404
-include config.mak
417405

406+
ifeq ($(uname_S),Darwin)
407+
ifndef NO_FINK
408+
ifeq ($(shell test -d /sw/lib && echo y),y)
409+
BASIC_CFLAGS += -I/sw/include
410+
BASIC_LDFLAGS += -L/sw/lib
411+
endif
412+
endif
413+
ifndef NO_DARWIN_PORTS
414+
ifeq ($(shell test -d /opt/local/lib && echo y),y)
415+
BASIC_CFLAGS += -I/opt/local/include
416+
BASIC_LDFLAGS += -L/opt/local/lib
417+
endif
418+
endif
419+
endif
420+
418421
ifndef NO_CURL
419422
ifdef CURLDIR
420423
# This is still problematic -- gcc does not always want -R.

fetch.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ void pull_say(const char *fmt, const char *hex)
2222
fprintf(stderr, fmt, hex);
2323
}
2424

25-
static void report_missing(const char *what, const unsigned char *missing)
25+
static void report_missing(const struct object *obj)
2626
{
2727
char missing_hex[41];
28-
29-
strcpy(missing_hex, sha1_to_hex(missing));;
30-
fprintf(stderr,
31-
"Cannot obtain needed %s %s\nwhile processing commit %s.\n",
32-
what, missing_hex, sha1_to_hex(current_commit_sha1));
28+
strcpy(missing_hex, sha1_to_hex(obj->sha1));;
29+
fprintf(stderr, "Cannot obtain needed %s %s\n",
30+
obj->type ? typename(obj->type): "object", missing_hex);
31+
if (!is_null_sha1(current_commit_sha1))
32+
fprintf(stderr, "while processing commit %s.\n",
33+
sha1_to_hex(current_commit_sha1));
3334
}
3435

3536
static int process(struct object *obj);
@@ -177,7 +178,7 @@ static int loop(void)
177178
*/
178179
if (! (obj->flags & TO_SCAN)) {
179180
if (fetch(obj->sha1)) {
180-
report_missing(typename(obj->type), obj->sha1);
181+
report_missing(obj);
181182
return -1;
182183
}
183184
}

0 commit comments

Comments
 (0)