cg-admin-rewritehist --tree-filter revives removed files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]