Merge branch 'maint'

* maint:
  SunOS grep does not understand -C<n> nor -e
  Fix export_marks() error handling.
  git branch: clean up detached branch handling
  git branch: avoid unnecessary object lookups
  git branch: fix performance problem
  do_one_ref(): null_sha1 check is not about broken ref

Conflicts:
	Makefile
This commit is contained in:
Junio C Hamano
2009-07-24 09:27:09 -07:00
4 changed files with 53 additions and 33 deletions

5
refs.c
View File

@ -531,9 +531,10 @@ static int do_one_ref(const char *base, each_ref_fn fn, int trim,
{
if (strncmp(base, entry->name, trim))
return 0;
/* Is this a "negative ref" that represents a deleted ref? */
if (is_null_sha1(entry->sha1))
return 0;
if (!(flags & DO_FOR_EACH_INCLUDE_BROKEN)) {
if (is_null_sha1(entry->sha1))
return 0;
if (!has_sha1_file(entry->sha1)) {
error("%s does not point to a valid object!", entry->name);
return 0;