Skip to content

Commit

Permalink
fix: use discover method instead of open
Browse files Browse the repository at this point in the history
closes #1
  • Loading branch information
yoannfleurydev committed Mar 4, 2019
1 parent 7368a8e commit ab9e752
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
33 changes: 22 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.4] - 2019-03-04

### Fixed

- now able to use gitweb in git repository subdirectories

## [0.1.3] - 2019-02-18

### Added
Expand All @@ -15,30 +21,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- editorconfig
- git2 library to use git wrapper instead of system command
- editorconfig
- git2 library to use git wrapper instead of system command

### Removed

- custom commands to get git information
- custom commands to get git information

## [0.1.1] - 2019-02-16

### Added

- this changelog
- build status
- this changelog
- build status

### Changed

- set default browser as the first to be open
- allow `$BROWSER` to override the default browser of the system
- allow `--browser` to override the `$BROWSER` environment variable and the default browser
- set default browser as the first to be open
- allow `$BROWSER` to override the default browser of the system
- allow `--browser` to override the `$BROWSER` environment variable and the default browser

## [0.1.0] - 2019-02-13

### Added

- default behavior of the command is to open the current repository in the browser
- add `--branch` option to open a custom branch (default behavior is the current branch of the repo)
- add `--browser` to open a custom browser
- default behavior of the command is to open the current repository in the browser
- add `--branch` option to open a custom branch (default behavior is the current branch of the repo)
- add `--browser` to open a custom browser

[0.1.4]: https://github.com/yoannfleurydev/gitweb/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/yoannfleurydev/gitweb/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/yoannfleurydev/gitweb/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/yoannfleurydev/gitweb/compare/v0.1.0...v0.1.1
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gitweb"
version = "0.1.3"
version = "0.1.4"
authors = ["Yoann Fleury <yoann.fleury@yahoo.com>"]
edition = "2018"
description = "Open the current remote repository in your browser"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
repository.

```
gitweb 0.1.3
gitweb 0.1.4
Yoann Fleury <yoann.fleury@yahoo.com>
Open the current remote repository in your browser
Expand Down
2 changes: 1 addition & 1 deletion src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::logger::Logger;
use git2::{ErrorCode, Repository};

pub fn get_repo() -> Repository {
return match Repository::open(".") {
return match Repository::discover(".") {
Ok(repo) => repo,
Err(e) => panic!("failed to open: {}", e),
};
Expand Down

0 comments on commit ab9e752

Please sign in to comment.