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

Re: [BUG] Destructive access to an "objects/info/alternates" repository

From
SMStefan Monnier <monnier@iro.umontreal.ca>
Date
Dec 28, 2020, 19:29 UTC
Message-ID
<jwv8s9hd9cg.fsf-monnier+Inbox@gnu.org>
In-Reply-To
<20201228190036.vnkgeu6puxmvgt5s@chatter.i7.local>
Show 7 quoted lines
>>     git clone --reference ~otheruser/nongnu
>
> This doesn't appear to be a proper command, because it's missing actual
> repository to clone, only the repository to use as reference. This is the
> proper usage of --reference:
>
> git clone --reference ~/some/repo https://some/remote/repo.git
Indeed, thanks:
git clone --reference ~otheruser/nongnu https://git.savannah.gnu.org/r/emacs/nongnu.git
> Without knowing exactly what you did, it's hard to tell what went wrong. You
> can try running "find nongnu" to see if what you think is your own checkout is
> actually a symlink or some combination thereof.
Not sure what you mean by that.
In any case, I just reproduced the problem:
    % git clone --reference ~otheruser/nongnu https://git.savannah.gnu.org/r/emacs/nongnu.git
    Cloning into 'nongnu'...
    Fetching objects: 36974, done.
    % cd nongnu 
    % git gc
    Enumerating objects: 36974, done.
    Nothing new to pack.
    warning: unable to unlink '/home/otheruser/nongnu/.git/objects/pack/pack-0d85e74ac2f7e51ce26f281e64eb738e8182fa95.idx': Permission denied
    warning: unable to unlink '/home/otheruser/nongnu/.git/objects/pack/pack-5fe14feff49ccdee5469af9dc94f6784e8464a6b.idx': Permission denied
    % ls -l /home/otheruser/nongnu/.git/objects/pack/pack-0d85e74ac2f7e51ce26f281e64eb738e8182fa95.idx
    -rw-r--r-- 1 otheruser otheruser 975612 Dec 11 16:08 /home/otheruser/nongnu/.git/objects/pack/pack-0d85e74ac2f7e51ce26f281e64eb738e8182fa95.idx
    % ls -ld /home/otheruser/nongnu/.git/objects/pack
    drwxr-xr-x 2 otheruser otheruser 4096 Dec 27 17:57 /home/otheruser/nongnu/.git/objects/pack/
    %
-- Stefan
Previous: Konstantin RyabitsevNext: Stefan Monnier
Message 3 of 9 in “[BUG] Destructive access to an "objects/info/alternates" repository”
  1. Stefan MonnierDec 28, 2020
  2. Konstantin RyabitsevDec 28, 2020
  3. Stefan MonnierDec 28, 2020
  4. Stefan MonnierDec 28, 2020
  5. Konstantin RyabitsevDec 29, 2020
  6. Stefan MonnierJan 3, 2021
  7. Konstantin RyabitsevJan 4, 2021
  8. Stefan MonnierJan 4, 2021
  9. Konstantin RyabitsevJan 4, 2021

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.