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

Re: little conundrum

From
Alan Chandler <alan@chandlerfamily.org.uk>
Date
Nov 3, 2005, 18:48 UTC
Message-ID
<200511031848.58040.alan@chandlerfamily.org.uk>
In-Reply-To
<20051103181002.GA26437@bohr.gbar.dtu.dk>
On Thursday 03 Nov 2005 18:10, Peter Eriksen wrote:
Show 10 quoted lines
> On Thu, Nov 03, 2005 at 05:41:20PM +0000, Alan Chandler wrote:
> > I have a little problem I am trying to solve.  Tried a few things and got
> > nowhere, so I thought I would ask here.
> >
> > I have two directories one of which contains a tree of source code that
> > was an original software package that I downloaded.  The other contains
> > the result of some unfinished - but quite substancial changes that I had
> > made to that source code.  Since this was some time ago, I don't have any
> > records, but it is quite possible that I added and removed quite a few
> > files.
Show 15 quoted lines
> What I read from this, is that you could do something like (with Git,
> but I suppose Cogito is very similar):
>
> ]cd original
> ]git-init-db
> ]git-add all-the-files
> ]git-commit -m "Initial import"
> ]cp -rf ../modified/* .
> ]git-status
> ...fix things up adding and deleting files
> ]git-commit -m "First big change
>
> The point is, I think git-status will tell you about any
> modifications you have made by just overwriting the original
> tree with the modified one.

The advantage of cg-init (as opposed git-init-db) is that it finds all the files to add.

I just did a quick trial of this, and it appears that git-status does not notice deleted or added files.

That is one of the major issues that was worrying me - that I didn't miss any of those.

There is a manual workaround - I have just run up kdiff3 (from kde) on the two directories and it is showing 59 file differences (as opposed to the 21 reported by git-status). So I could go down them one by one and deal with them.

But I was hoping there was an automated method:-(
-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.
Previous: Peter EriksenNext: Peter Eriksen
Message 7 of 12 in “little conundrum”
  1. Alan ChandlerNov 3, 2005
  2. Johannes SchindelinNov 3, 2005
  3. Peter EriksenNov 3, 2005
  4. Alan ChandlerNov 3, 2005
  5. Johannes SchindelinNov 4, 2005
  6. Peter EriksenNov 3, 2005
  7. Alan ChandlerNov 3, 2005
  8. Peter EriksenNov 3, 2005
  9. Alan ChandlerNov 3, 2005
  10. Peter EriksenNov 3, 2005
  11. Petr BaudisNov 3, 2005
  12. Alan ChandlerNov 3, 2005

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.