Comments (4)
It seems to be an issue with git2. A minimal example that reproduces this is:
use git2::{Repository, IndexAddOption};
fn main() {
let repo = Repository::open("./").unwrap();
let mut index = repo.index().unwrap();
index.add_all(["*"].iter(), IndexAddOption::DEFAULT, None).unwrap();
}
I'm not sure if the git2/libgit2 behavior here is a bug. Git itself when asked to git add -A
in this situation adds the repository as a subproject link and prints a hint about adding it as a submodule instead.
from dura.
This is a git2-rs behaviour which returns Result::Err
when adding another git repo inside a subdirectory.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { code: -1, klass: 10, message: "invalid path: 'foo-git/'" }', src/main.rs:6:64
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Not sure if the preferred behaviour for dura would be ignoring these paths or adding them into consideration for checking the diff. Personally, I'd probably ask dura to watch the repos in subdirectory separately.
from dura.
Thanks for reporting. I don't have much time to look at it this weekend, but I might next week. I'm not quite sure what's going on.
from dura.
The ideal scenario I guess would be a include_sub_repos
setting (or something to that effect) so you can toggle it. I think that should default to false
.
I'd probably ask dura to watch the repos in subdirectory separately
Do you think using the existing include
option would be a good way of doing this, or would that risk confusion? Would it be safer to just stick to adding an entire new repo entry in the config?
from dura.
Related Issues (20)
- Update: Upgrade clap to V3.1.6 & replace deprecated code in main.rs HOT 2
- Dura doesn't create any branches on github codespaces HOT 2
- brew install dura HOT 4
- Couldnt you just git commit more often? HOT 4
- Error: UnbornBranch HOT 6
- Update clap
- Data Corruption: Don't allow dura to run as root
- Ubuntu install instructions HOT 2
- Donβt create unnecessary branches
- Chronological git log HOT 2
- feature request: remove old dura branches periodically HOT 1
- support install linux and macOS with brew HOT 15
- `dura checkout` command HOT 6
- Tests broken HOT 3
- Binaries built by Github are not working HOT 6
- Prevent pushin dura branches to remote HOT 4
- stabilize config loading HOT 2
- Make dura branch names more informative HOT 3
- Feature Request: `dura status` command HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dura.