On Tue, Aug 23, 2005 at 03:43:56PM -0400, Daniel Barkalow wrote:
> On Tue, 23 Aug 2005, Carl Baldwin wrote:
> 
> > Hello,
> >
> > I recently started using git to revision control the source for my
> > web-page.  I wrote a post-update hook to checkout the files when I push
> > to the 'live' repository.
> >
> > In this particular context I decided that it was important to me to remove
> > deleted files after checking out the new HEAD.  I accomplished this by 
> > running
> > git-ls-files before and after the checkout.
> >
> > Is there a better way?  Could there be some way built into git to easily
> > find out what files dissappear when replacing the current index with one
> > from a new tree?  Is there already?  The behavior of git should NOT
> > change to delete these files but I would argue that some way should
> > exist to query what files disappeared if removing them is desired.
> 
> If you don't use -f, git-checkout-script removes deleted files. Using -f
> tells it to ignore the old index, which means that it can't tell the
> difference between removed files and files that weren't tracked at all.

Maybe I'm doing something wrong.  This does not happen for me.

I tried a simple test with git v0.99.4...

cd
mkdir test-git && cd test-git/
echo testing | cg-init
echo contents > file
git-add-script file
git-commit-script -m 'testing'
cd ..
cg-clone test-git/.git/ test-git2
cd test-git2
cg-rm file
git-commit-script -m 'testing'
ls
cg-push
cd ../test-git
git-checkout-script
ls
git-status-script

At this point, I want 'file' to be gone.  It is, however, still there.
That is the situation that my code was meant to handle.  Maybe you were
thinking of something different?  Maybe there is new code since 0.99.4?

Now, I think it would be wrong for git-checkout-script to actually
remove files unless an option were given to do so.  So, the behavior
that I observe is correct in my opinion.  I'm looking for a way to find
out what files should be deleted if that is desired.

Thanks,
Carl

>       -Daniel
> *This .sig left intentionally blank*
> 

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Carl Baldwin                        Systems VLSI Laboratory
 Hewlett Packard Company
 MS 88                               work: 970 898-1523
 3404 E. Harmony Rd.                 work: [EMAIL PROTECTED]
 Fort Collins, CO 80525              home: [EMAIL PROTECTED]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to