Skip to content

Commit

Permalink
Update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlogic committed Feb 18, 2010
1 parent d8e1bba commit b37dc40
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
48 changes: 25 additions & 23 deletions README.markdown
Expand Up @@ -7,42 +7,44 @@ more than one author.


Install the gem: Install the gem:


gem install git-pair gem install edgecase-git-pair


And here's how to use it! (Note: this reflects the current development And here's how to use it!
version. Run `git pair` with no arguments to see the instructions for your
version.)


$ git pair $ git pair


Configuration: General Syntax:
git pair [options] git pair [reset | authors | options]
-a, --add NAME Add an author. Format: "Author Name <author@example.com>"
Options:
-a, --add AUTHOR Add an author. Format: "Author Name <author@example.com>"
-r, --remove NAME Remove an author. Use the full name. -r, --remove NAME Remove an author. Use the full name.
-d, --reset Reset current author to default (global) config


Switching authors: Switching authors:
git pair AA [BB] Where AA and BB are any abbreviation of an git pair aa [bb] Where AA and BB are any abbreviation of an
author's name. You can specify one or more authors. author's name. You can specify one or more authors.


Once you've added authors, running `git pair` with no options will also print Current config:
out their names, the current pair, and some other information. Author list: Adam McCrea
Jon Distad

Current author: Jon Distad + Adam McCrea
Current email: devs+jd+am@edgecase.com


## Known issues ## How does it work?


* I just shoved everything into a gem. Refactor into separate files. The list of authors is maintained in the global git configuration file.
* Test coverage is low -- I'm working on a cucumber suite. The current author is set in the git configuration local to the project.
The email address for a pair is generated using the default email address
from the global configuration along with the developer abbreviations.


## Feature hit list ## About this version


* <s>It'd be better if you could specify an email address for each author instead This was forked from http://github.com/chrisk/git-pair. Many thanks to
of just automatically using the authors' initials. Especially if you have two Chris Kampmeier for the original version. Our version added the --reset
authors with the same initials. And also because when there's just one author, option, modified how email addresses are handled, and refactored much of
it should use that person's email instead of an interpolation like the code.
`devs+ck@example.com`.</s> Started! Now accepts author names w/ emails, but
doesn't yet prompt for/generate an email based on the pairs' addresses.
* Needs `git pair --reset` to restore the original `user.name` and `user.email`.
For now, just `git config --edit` and remove the `[user]` section to go back
to your global config.


## License ## License


Expand Down
6 changes: 1 addition & 5 deletions lib/git-pair/command.rb
Expand Up @@ -25,13 +25,9 @@ def run!(args)


opts.separator ' ' opts.separator ' '
opts.separator highlight('Switching authors:') opts.separator highlight('Switching authors:')
opts.separator ' git pair AA [BB] Where AA and BB are any abbreviation of an' opts.separator ' git pair aa [bb] Where AA and BB are any abbreviation of an'
opts.separator ' '*37 + 'author\'s name. You can specify one or more authors.' opts.separator ' '*37 + 'author\'s name. You can specify one or more authors.'


opts.separator ' '
opts.separator highlight('Resetting authors:')
opts.separator ' git pair reset Reverts to the user specified in your Git configuration.'

opts.separator ' ' opts.separator ' '
opts.separator highlight('Current config:') opts.separator highlight('Current config:')
opts.separator author_list.split("\n") opts.separator author_list.split("\n")
Expand Down

0 comments on commit b37dc40

Please sign in to comment.