Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jan 24, 2010
  1. Add TODOS

  2. Fix '/ No newline at end of file' occuring in diffs; Fix scrolling at…

    … bottom of viewport for adds that add past the bottom of the viewport
Commits on Jan 14, 2010
Commits on Dec 29, 2009
  1. Add gitignore

  2. WIP of major refactoring to support seek bar; I accidentally deleted …

    …my .git folder for this repo, so this is a bunch of commits squished into one big commit
Commits on Nov 26, 2009
  1. Futher cleanup

  2. Refactor javascript

Commits on Nov 23, 2009
Commits on Nov 22, 2009
  1. @toolmantim
  2. @toolmantim
  3. @toolmantim
  4. @toolmantim
  5. @toolmantim
  6. @toolmantim

    Use class_eval to make class extension more obvious. Does Actor alrea…

    toolmantim authored
    …dy exist? Where does it come from?
  7. @toolmantim
  8. @toolmantim
  9. @toolmantim
  10. @toolmantim
  11. @toolmantim
  12. @quackingduck

    In general, messages like "Loading $foo" should go to standard error.…

    quackingduck authored
    … My litmus test is to run the command with `2> /dev/null` at the end of the line. If the output on the terminal is not 100% necessary to operate the program, it should have gone to standard error.
  13. @quackingduck

    Prompting the user for arguments via `gets` doesn't really make sense…

    quackingduck authored
    … for the target audience of gistory. A better strategy is to provide some usage instructions (and return a non-zero exit status) when the required arguments are not provided.
    This allows the user to make full use of their shell (tab completion etc) when providing your program with input values.
    Additionally, methods that end with a `?` should *test* for some condition in their environment, their arguments or a combination of the two. Their return value should generally be a boolean.
    For example:
      def missiles_lauched?
    The `supplied?` method should have been  a verb like `get` or `ask_for`.
    `get_commits` was defined then immediately called. Generally you define a method for two reasons:
    1. To facilitate code re-use by factoring out common functionality
    2. To provide a meaningful name for a block of code
    In this case it looks like `get_commits` was defined simply to provide a scope for some local variables such as `log_data` and `commit_diff_data`. Ruby provides a better way to this: the `begin` keyword. So
      def get_commits
        ... code that builds the commits ...
      commits = get_commits
    can be more clearly written as
      commits = begin
        ... code that builds the commits ...
    As you can see on line 12 `begin` blocks can be combined with the `rescue` keyword to form basic control structures:
      repo = begin
      rescue InvalidGitRepositoryError
        abort "Error: #{repo_path} is not a git repo"
  14. @quackingduck

    Kernel#abort does three things:

    quackingduck authored
    1. It sets the exit status to 1
    2. It prints its argument to stderr
    3. It terminates the process
      abort "unable to launch missiles :("
    is equivalent to:
      $stderr.puts "unable to launch missiles :("
    When printing an error message, it's often a good idea to use the word "error". Users are familiar with that. Also try not to use generic terms like "input" and "data", be specific. When possible, give the user a hint about what they did wrong. For example:
      Permission error
    Might be rephrased as:
      Error: Unable to start server on 366
      Are you root?
  15. @quackingduck

    This code validates preconditions that are required to run the app. Y…

    quackingduck authored
    …ou can make this obvious by putting the code at the top of the file.
  16. @quackingduck
  17. @quackingduck

    Not neccessary. Set the RUBYOPT environment variable to rubygems. For…

    quackingduck authored
    … example (in ~/.profile):
      export RUBYOPT=rubygems
Commits on Sep 19, 2009
  1. Add pause before remove

    Brenton Fletcher authored
Commits on Sep 18, 2009
  1. Fix rendering bugs, make start-up a bit nicer

    Brenton Fletcher authored
Commits on Sep 10, 2009
  1. Move wait after change delay to a variable

    Brenton Fletcher authored
Commits on Sep 9, 2009
  1. FIx bug in diff code, improve animations

    Brenton Fletcher authored
Commits on Sep 5, 2009
Commits on Sep 1, 2009
  1. Commit view tweaks

    Brenton Fletcher authored
Something went wrong with that request. Please try again.