git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Lars Hjemli <hjemli@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"René Scharfe" <rene.scharfe@lsrfire.ath.cx>
Subject: Re: [RFC/PATCH v3 2/3] sha1_file: prepare for adding alternates on demand
Date: Fri, 23 Jan 2009 00:43:29 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.1.00.0901230041500.3586@pacific.mpi-cbg.de> (raw)
In-Reply-To: <1232659071-14401-3-git-send-email-hjemli@gmail.com>

Hi,

On Thu, 22 Jan 2009, Lars Hjemli wrote:

> @@ -285,9 +286,10 @@ static int link_alt_odb_entry(const char * entry, int len, const char * relative
>  
>  	/* Detect cases where alternate disappeared */
>  	if (!is_directory(ent->base)) {
> -		error("object directory %s does not exist; "
> -		      "check .git/objects/info/alternates.",
> -		      ent->base);
> +		if (!quiet)
> +			error("object directory %s does not exist; "
> +			      "check .git/objects/info/alternates.",
> +			      ent->base);
>  		free(ent);
>  		return -1;
>  	}
> [...]
> @@ -2573,3 +2579,11 @@ int read_pack_header(int fd, struct pack_header *header)
>  		return PH_ERROR_PROTOCOL;
>  	return 0;
>  }
> +
> +int add_alt_odb(char *path, int quiet)
> +{
> +	int err = link_alt_odb_entry(path, strlen(path), NULL, 0, quiet);
> +	if (!err)
> +		prepare_packed_git_one(path, 0);
> +	return err;
> +}

FWIW my concern is not at all addressed.  A future user of add_alt_odb() 
(and possibly your users in rare cases, too) can trigger the error that 
suggests looking into the alternates.  Leaving the human user puzzled.

Ciao,
Dscho

  parent reply	other threads:[~2009-01-22 23:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 21:17 [RFC/PATCH v3 0/3] Add support for `git archive --submodules` Lars Hjemli
2009-01-22 21:17 ` [RFC/PATCH v3 1/3] tree.c: teach read_tree_recursive how to traverse gitlink entries Lars Hjemli
2009-01-22 21:17   ` [RFC/PATCH v3 2/3] sha1_file: prepare for adding alternates on demand Lars Hjemli
2009-01-22 21:17     ` [RFC/PATCH v3 3/3] archive.c: add basic support for submodules Lars Hjemli
2009-01-22 23:44       ` Johannes Schindelin
2009-01-23 18:40         ` Lars Hjemli
2009-01-23 19:23           ` Junio C Hamano
2009-01-23 20:15             ` Lars Hjemli
2009-01-23 20:50               ` Junio C Hamano
2009-01-23 21:15                 ` Lars Hjemli
2009-01-23 19:57           ` Johannes Schindelin
2009-01-24  8:44             ` Lars Hjemli
2009-01-24 13:51               ` Johannes Schindelin
2009-01-24 19:26                 ` Lars Hjemli
2009-01-24 19:52                   ` Johannes Schindelin
2009-01-24 20:02                     ` Lars Hjemli
2009-01-22 23:43     ` Johannes Schindelin [this message]
2009-01-23 18:35       ` [RFC/PATCH v3 2/3] sha1_file: prepare for adding alternates on demand Lars Hjemli
2009-01-23 19:54         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.00.0901230041500.3586@pacific.mpi-cbg.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hjemli@gmail.com \
    --cc=rene.scharfe@lsrfire.ath.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).