github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

knu / di

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (10)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (10)
    • v0.1.9
    • v0.1.8
    • v0.1.7
    • v0.1.6
    • v0.1.5
    • v0.1.4
    • v0.1.3
    • v0.1.2
    • v0.1.1
    • v0.1.0
  • Branch List
Sending Request…

A wrapper around GNU diff(1) — Read more

  Cancel

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Enhance suspicious whitespace highlighting. 
knu (author)
Sun May 30 04:40:06 -0700 2010
commit  f34b099e83e7c584586e
tree    c98de1580ff5c90f35a9
parent  fed06a80f1cb9bd02fb3
di /
name age
history
message
file .document Loading commit data...
file .gitignore
file HISTORY
file LICENSE
file README.rdoc
file Rakefile
directory bin/
file di.gemspec
directory lib/
directory test/
README.rdoc

di

  • www.idaemons.org/projects/di/

DESCRIPTION:

di - a wrapper around GNU diff(1)

FEATURES:

The di(1) command wraps around GNU diff(1) to provide reasonable default settings and some original features:

  - Useful options turned on by default: -U3 -N -p -d.

  - Diff output is colorized, and paginated by user's favorite pager.

  - Non-significant files are ignored by default, such as backup
    files, object files, VCS administration files, etc. a la
    rsync(1)'s --cvs-ignore option.

  - Ignore difference of lines containing RCS tags.

  - Perform recursive comparison.

  - Support combinations of command line options that GNU diff(1) is
    expected to but does not support.

  - Default set of options are configurable via environment variable.

  - Any option can be negated from a command line. (Specify -N- to
    negate the default -N, etc.)

SYNOPSIS:

Run di —help for help.

USAGE:

Just use di(1) for diff(1) as a wrapper.

There are a few occations you shouldn’t simply substitute di(1) for diff(1). For example, svn calls the external diff for each changed file, so the pagination enabled by default would be annoying.

In such a case, you can have a non-paginating version of di as below:

    # Give it another name
    ln di ndi

    # Set default options for the new command; put these lines in your
    # shell's startup file
    NDI_OPTIONS=--no-pager
    export NDI_OPTIONS

Then set diff-cmd to the new command in ~/.subversion/config.

    [helpers]
    diff-cmd = ndi

REQUIREMENTS:

  • Ruby 1.8.7 or later
  • GNU diff(1)

INSTALL:

    gem install di

Or just install lib/di.rb as "di" to a directory in your PATH.

COPYRIGHT:

Copyright © 2008, 2009, 2010 Akinori MUSHA

See LICENSE for license terms.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
  • English
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文