Re: How to ensure a word has been removed from repository?

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

 



On Tue, 3 Nov 2009, Patrick Higgins wrote:

> Hi all,
> 
> I just completed a series of filter-branch commands to remove a couple
> of sensitive words from a repository before I publish it. The words
> were found in commit messages, directory names, file contents, and
> various other places (kind of weird, I know). I believe I have removed
> them all, but I would like to double check but don't know how.
> 
> Given that much of the repository is stored in compressed packs, I
> can't just use grep to look for the words. To get around this, I've
> unpacked the objects, use a Perl script (filtinf example script) to
> decompress them and then use grep (this has proven to be quite slow).
> 
> Is that going to find every possible occurrence if all the relevant
> files are plain text?
> 
> Is there an easier way to search the repository? The way I'm doing it
> has required some awfully deep knowledge to expire and prune
> everything. I feel like I must be missing something.

An easy way to look for the presence of a particular string in all the 
repository data is:

	git rev-list --all --objects | cut -c -40 | \
		git cat-file --batch | grep <string>

Alternatively you can use:

	git fast-export --all --signed-tag=verbatim | grep <string>


Nicolas
--
To unsubscribe from this list: 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]