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

Re: 'typechange' in the git-status output

From
Drew Northup <drew.northup@maine.edu>
Date
Mar 14, 2011, 18:59 UTC
Message-ID
<1300129161.13980.4.camel@drew-northup.unet.maine.edu>
In-Reply-To
<AANLkTikkHWFrjmrPMP_poxrkCwE34jqaFDbU1Roouw--@mail.gmail.com>
On Mon, 2011-03-14 at 20:39 +0200, Alexei Sholik wrote:
Show 8 quoted lines
> On 14 March 2011 20:29, Alexei Sholik <alcosholik@gmail.com> wrote:
> > Hi git,
> >
> > I cloned git mirror from github[1]. When I run git-status in it's
> > working directory, I see no output.
> >
> > But then, after copying the whole directory with 'cp -r' and running
> > git-status in the newly created directory, I get the following:
Show 12 quoted lines
> Right, I've figured out the root of the change.
> 
> 'ls -l' on the original RelNotes outputs:
>   lrwxr-xr-x  1 alco  staff  32 Mar 14 20:35 RelNotes ->
> Documentation/RelNotes/1.7.5.txt
> 
> 'ls -l' on the copied RelNotes outputs:
>   -rw-r--r--  1 alco  staff  1810 Mar 14 20:10 RelNotes
> 
> So the problem is with the cp, not git. But I wonder if it is
> mentioned anywhere in the docs? Probably, git-clone's or git-status'
> manpage would be a proper place?
Quoting Jeff King <peff@peff.net>:
> "cp -r" isn't an exact copy. You probably want "cp -a" or at least "cp
> -rs".
.....
> Right. RelNotes is a symlink. But "cp -r" dereferences the symlink and
> copies the file contents themselves.

As has been said more than a few times (and is probably somewhere in the docs), if you really want to duplicate a git repo you should probably be using git to do it. No change to the manpages is required here.

-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Previous: Alexei SholikNext: Jonathan Nieder
Message 4 of 7 in “'typechange' in the git-status output”
  1. Alexei SholikMar 14, 2011
  2. Jeff KingMar 14, 2011
  3. Alexei SholikMar 14, 2011
  4. Drew NorthupMar 14, 2011
  5. Jonathan NiederMar 14, 2011
  6. Jeff KingMar 14, 2011
  7. Junio C HamanoMar 14, 2011

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.