Re: getting rid of extra directories
- From
- Zack Brown <zbrown@tumblerings.org>
- Date
- Oct 15, 2005, 19:27 UTC
- Message-ID
- <20051015192720.GA11364@tumblerings.org>
- In-Reply-To
- <7vu0fimzhn.fsf@assigned-by-dhcp.cox.net>
On Sat, Oct 15, 2005 at 11:00:52AM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Zack Brown <zbrown@tumblerings.org> writes: > > > I've been using the latest Cogito. When I seek back and forth in a git repo, > > directories I've created tend to persist backward in time, cluttering up > > earlier versions. > > > > By the discussions on this list, I'm pretty sure there's a way to stop this, > > but I don't know clearly what it is, and I'm worried about trying things > > that might corrupt my repository. Could someone spell it out for me please? > > I do not know exactly what Cogito "seek back and forth" does,
It means to "cg-seek" back to an earlier state of the repo, and forward to a more recent state of the repo. "seeking back and forth" means doing a lot of "cg-seek" commands. Sorry that wasn't clear.
> but updating to git-core "master" branch may help.
I already use that branch.
Here's some commands that reproduce the problem:
$ mkdir tmpproj $ cd tmpproj $ cg-init
give the initial commit message and save
$ ls > a $ cg-add a $ cg-commit
give the commit message and save
$ cg-tag nodirs $ mkdir d $ mv a d/a $ cg-rm a $ cg-add d/a $ cg-commit
give the commit message and save
$ cg-seek nodirs
now I would expect to see the original directory, with no 'd' subdirectory, and just the 'a' file sitting there.
$ ls -F a d/ $
See the problem? The 'd' directory did not exist in this version of the repository, but it's there anyway.
Be well, Zack
Show 20 quoted lines
> > Specifically, this commit intends to remove empty directory from > the working tree, where previously checked out tree object had > files/directories inside while newly checked out tree does not. > > commit 340e4f88c083b0692e6554b1c2c27fd43c7cc8d3 > Author: Junio C Hamano <junkio@cox.net> > Date: Mon Oct 10 17:34:08 2005 -0700 > > Remove empty directories after read-tree -u. > > This fixes everybody's favorite gripe that switching branch > with 'git checkout' leaves empty directories. > > Signed-off-by: Junio C Hamano <junkio@cox.net> > > - > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
-- Zack Brown