mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Formatting
This commit is contained in:
12
README.md
12
README.md
@@ -148,12 +148,12 @@ For example, the following repository has a large Javascript file in an unusual
|
|||||||
```
|
```
|
||||||
> cat .gitattributes
|
> cat .gitattributes
|
||||||
special-vendored-path/* linguist-vendored=true
|
special-vendored-path/* linguist-vendored=true
|
||||||
|
```
|
||||||
> irb
|
```ruby
|
||||||
> require 'linguist'
|
require 'linguist'
|
||||||
> repo = Rugged::Repository.new('.') #to read .gitattributes data we need the git repository
|
repo = Rugged::Repository.new('.') #to read .gitattributes data we need the git repository
|
||||||
> sha = repo.head.target_id #current commit
|
sha = repo.head.target_id #current commit
|
||||||
> blob = Linguist::LazyBlob.new(repo, sha, 'special-vendored-path/massive-js-file.js').vendored?
|
blob = Linguist::LazyBlob.new(repo, sha, 'special-vendored-path/massive-js-file.js').vendored?
|
||||||
=> true
|
=> true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user