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

Re: New script: cg-clean

From
Petr Baudis <pasky@suse.cz>
Date
Aug 12, 2005, 01:08 UTC
Message-ID
<20050812010811.GM25280@pasky.ji.cz>
In-Reply-To
<1123808053.4248.47.camel@dv>

Dear diary, on Fri, Aug 12, 2005 at 02:54:13AM CEST, I got a letter where Pavel Roskin <proski@gnu.org> told me that...

> Hi, Petr!
Hi,
> Unfortunately, my latest revision of cg-clean has "committed suicide"
> just when I was about to post it.  Anyway, I would prefer to wait until
> you apply my patch to cg-status to ignore all ignores.  That would allow
> me to reuse cg-status.

well, I did quite a while ago. Unless the kernel.org mirroring system broke, it should be already public.

Show 10 quoted lines
> On Fri, 2005-08-12 at 01:29 +0200, Petr Baudis wrote:
> > > Here's the simplified cg-clean script.  Note that the "-d" option is not
> > > working with the current version of git of a bug in git-ls-files.  I can
> > > work it around by scanning all directories in bash, but I think it's
> > > easier to fix git (remove "continue" before DT_REG in ls-files.c).
> > 
> > Is that fixed already?
> 
> It turn out it's quite tricky.  git-ls-files doesn't distinguish between
> known and unknown directories.

In the long term, I would prefer to have directory information in the index file - to make this kind of tasks easier, allow juggling with empty directories etc.

Show 6 quoted lines
> One way to do it would be to check all
> cached files and find all directories they are in.  Another approach
> would involve "git-ls-tree -r", but I don't think it would be right
> because we work with cache and current files, not with committed data
> (but my knowledge is limited to make a call - I still need to read the
> documentation about git).

Yes, we should certainly follow the index, otherwise you will e.g. lose the files added by cg-add but not committed yet.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone.  -- Alan Cox
Previous: Pavel RoskinNext: Pavel Roskin
Message 7 of 8 in “New script: cg-clean”
  1. Pavel RoskinJul 8, 2005
  2. Wolfgang DenkJul 8, 2005
  3. Petr BaudisJul 10, 2005
  4. Pavel RoskinAug 6, 2005
  5. Petr BaudisAug 11, 2005
  6. Pavel RoskinAug 12, 2005
  7. Petr BaudisAug 12, 2005
  8. Pavel RoskinAug 12, 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.