This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
HELP = <<EOS | |
git-wtf displays the state of your repository in a readable, easy-to-scan | |
format. It's useful for getting a summary of how a branch relates to a remote | |
server, and for wrangling many topic branches. | |
git-wtf can show you: | |
- How a branch relates to the remote repo, if it's a tracking branch. | |
- How a branch relates to integration branches, if it's a feature branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python2.7 | |
''' | |
The function takes an iterable, or sequence of elements, and returns a list | |
of the elements that occur more than once. To achieve this, the first step | |
is to count the number of times each unique element occurs in the iterable | |
and stores that in a dictionary as a key value pair. The function then places | |
all key value pairs in a list of tuples if the value is not equal to one (1). | |
Then the function places only those unique elements that were duplicated, or | |
had a value greater than one (1), in a list and returns that list. |