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

Re: fetching a single commit from remote repo

From
NYNikita V. Youshchenko <yoush@debian.org>
Date
Feb 10, 2008, 17:17 UTC
Message-ID
<200802102017.03879@blacky.localdomain>
In-Reply-To
<alpine.LSU.1.00.0802101644540.11591@racer.site>
Show 14 quoted lines
> Hi,
>
> On Sun, 10 Feb 2008, Nikita V. Youshchenko wrote:
> > I'm looking for a way to fetch a single snapshot, without history,
> > from remote git repository.
> >
> > I've found how to do it with a head (clone --depth 1, or fetch --depth
> > 1).
> >
> > Is it possible to do the same with non-head and non-tagged commit, if
> > only sha1 name of the commit is known?
> > Looks like fetch and fetch-pack only take ref names :(
>
> Yes, for security reasons.
I can't understand what security issues this may cause ...

If one has enough access to a repository to clone it, he already has a way to download each and every object from there.

Ability to fetch the tree corresponding to particular commit won't add any new permissions to him, will it?

I'm looking for a way to get a copy of a particular previous state of the project tree, without having to download entire tree. Something similar checking out particular svn revision. This is going to be wrapped into a script, which is intended to be executed by people without any knowledge of any VC system at all. Commit id could be a parameter for such a script.

Nikita
Previous: Johannes SchindelinNext: Jan Hudec
Message 3 of 5 in “fetching a single commit from remote repo”
  1. Nikita V. YoushchenkoFeb 10, 2008
  2. Johannes SchindelinFeb 10, 2008
  3. Nikita V. YoushchenkoFeb 10, 2008
  4. Jan HudecFeb 15, 2008
  5. Jakub NarebskiFeb 10, 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.