git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-relink.perl: warn() instead of die() on directory open failure

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jan 12, 2008, 02:26 UTC
Message-ID
<4788256B.2080007@nrlssc.navy.mil>
In-Reply-To
<7vabnbzt6t.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 17 quoted lines
> Brandon Casey <casey@nrlssc.navy.mil> writes:
> 
>> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
>> ---
>>
>>
>> Sometimes the repository to link to is not under your control.
>> If it contains files or unreadable directories, git-relink will
>> die without this patch.
> 
> I am not so sure if dying is a bad behaviour, if it is because
> you are trying to link against an object store that you may not
> be able to read.  I actually think we should actively refuse to,
> in order to prevent future problems.  After seeing the command
> die, you will talk to the owner of that "master" object store
> and ask him to fix permissions (or he may choose to say "please
> do not share with me").

The case for me was that the objects directory contained temporary pack files. This is a perfectly valid state for a git repository, but relink() currently aborts the whole effort when it encounters a non-directory.

Stale tmp packs can remain if the user aborted a git command before it was finished. (hmm, maybe git-gc --prune could remove these too?)

I only mentioned the unreadable directory case as another possibility. You're probably right about that one.

-brandon
Previous: Junio C Hamano
Message 3 of 3 in “git-relink.perl: warn() instead of die() on directory open failure”
  1. git-relink.perl: warn() instead of die() on directory open failureBrandon Casey, Jan 11, 2008
  2. Junio C HamanoJan 12, 2008
  3. Brandon CaseyJan 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.