Git development
 help / color / mirror / Atom feed
* cg-admin-rewritehist --tree-filter revives removed files
@ 2006-04-11 19:26 Johannes Sixt
  0 siblings, 0 replies; only message in thread
From: Johannes Sixt @ 2006-04-11 19:26 UTC (permalink / raw)
  To: git

I ran this on a small project:

  cg-admin-rewritehist --tree-filter ':' testbranch

Thereafter, the tree in testbranch has all files that had been removed in the 
original history. I used cg-switch testbranch to check this.

The main loop in cg-admin-rewritehist does this (among others) for each commit 
in the original history:

if [ "$filter_tree" ]; then
	git-checkout-index -f -u -a
	eval "$filter_tree"
	git-diff-index -r $commit | cut -f 2- | tr '\n' '\0' | \
		xargs -0 git-update-index --add --replace --remove
	git-ls-files --others | tr '\n' '\0' | \
		xargs -0 git-update-index --add --replace --remove
fi

Appearently, once files are checked out, they stay in the working directory 
and are readded in all subsequent iterations if the current commit's tree 
does not contain them.

I'm not proficient enough to fix this problem myself, so I hope for help from 
the list.

Thanks,
-- Hannes

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-11 19:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 19:26 cg-admin-rewritehist --tree-filter revives removed files Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox