public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro•umontreal.ca>
To: git@vger•kernel.org
Subject: Re: [BUG] Destructive access to an "objects/info/alternates" repository
Date: Mon, 28 Dec 2020 14:29:03 -0500	[thread overview]
Message-ID: <jwv8s9hd9cg.fsf-monnier+Inbox@gnu.org> (raw)
In-Reply-To: <20201228190036.vnkgeu6puxmvgt5s@chatter.i7.local> (Konstantin Ryabitsev's message of "Mon, 28 Dec 2020 14:00:36 -0500")

>>     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


  reply	other threads:[~2020-12-28 19:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 18:50 [BUG] Destructive access to an "objects/info/alternates" repository Stefan Monnier
2020-12-28 19:00 ` Konstantin Ryabitsev
2020-12-28 19:29   ` Stefan Monnier [this message]
2020-12-28 20:17     ` Stefan Monnier
2020-12-29 15:44       ` Konstantin Ryabitsev
2021-01-03 16:50         ` Stefan Monnier
2021-01-04 13:54           ` Konstantin Ryabitsev
2021-01-04 20:47             ` Stefan Monnier
2021-01-04 21:20               ` Konstantin Ryabitsev

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

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

  git send-email \
    --in-reply-to=jwv8s9hd9cg.fsf-monnier+Inbox@gnu.org \
    --to=monnier@iro$(echo .)umontreal.ca \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox