Comments (11)
@tejlmand @nashif @mbolivar @ulfalizer please let me know which option you think is better
from west.
I also think that detached heads are gross so -1 on option 1. We have enough commands already so -0.5 on option 3.
I like 2 of what's left. If it's deeply upsetting that fetch
is a git term and we're doing something slightly different, we can rename it to west get
. Only half-joking.
from west.
@mbolivar
My thinking re. west fetch
was that it fetches upstream data and does nothing else, which is how git fetch
works.
You start with a blank "meta" repository (like an implicit git init
). Upstream data can be fetched into it with west fetch
, and branches can be created and checked out with e.g. west checkout -b worky-work
. To update a branch, you can use west pull
and west rebase
.
If a repository already exists, west fetch
is perfectly equivalent to git fetch
.
There's a risk that you stretch the metaphor too far though. This is definitely not obvious without docs, so we'd need those.
repo sync
is nice in that no one would be surprised by it cloning stuff, even without docs.
One thing that we definitely need to do is to mention west branch
super early on in the documentation.
from west.
@carlescufi
I was probably a bit overly negative earlier btw. west clone
kinda would make sense within the metaphor if it creates a master
branch in all the repositories.
Wondering at what point the metaphor would start to hurt more than help though...
from west.
One place where it breaks down at the moment is with west branch
. In git, that'd create a branch pointing at the current HEAD commit. In west
, it creates a new branch that tracks the manifest revision.
Bit worried that the metaphor will add confusion. Maybe the repo
guys considered stuff like this a long time ago, ran into cases where it doesn't work too well, and switched to a more specialized command set.
I'm still wondering how hard it would be to hack repo
to work alright on Windows. I haven't worked much with it, but it seems to have a ton of features that would probably take us years to replicate (especially as we'd re-make a bunch of mistakes they've already made and fixed). We should be careful so that this doesn't turn into an exercise in not-invented-here.
I had never worked with repo
before working on the west
stuff, so I just assumed there were problems with it that couldn't be fixed. Wondering if it's that bad though...
Still think we could build something alright, but something worth considering.
from west.
Ironically, Google seems to love mono-repositories by the way (whenever lots of tricky third-party stuff isn't involved, like in Android, I'm guessing): https://cacm.acm.org/magazines/2016/7/204032-why-google-stores-billions-of-lines-of-code-in-a-single-repository/fulltext
from west.
IMO the fetch command should act as git clone and get you to a state similar to when you first cloned a repo, followup commands can then be used to create a topic branch that can be pushed to a fork to create a pull request.
We should not try to implement the command based on what Git does, probably it will be wise to try and pick command names that are not git commands and that can be confused with what west is doing.
So my vote is to get to get rid of the detached HEAD and do what git clone does.
from west.
In that case we can settle with renaming west fetch
to west get
as suggested by @mbolivar so that people do not get confused.
from west.
In any case it's clear that detached HEADs are not acceptable after asking for feedback all around. I will wait for @ulfalizer to comment on this.
from west.
Planning to add a west clone
that does west fetch
+ west branch <remote HEAD branch, usually 'master'> <repository>
or the like. west fetch
would still clone, but most people probably wouldn't notice.
That would keep the internals sane, plus people can get the detached HEAD if they really want to.
from west.
Done
from west.
Related Issues (20)
- Support `west manifest --resolve` and `--freeze` with `manifest.project-filter` HOT 1
- Follow up work for `manifest.project-filter` implementation
- west init: CLI argument to automatically setup new workspace from template HOT 11
- `already defined as extension command`-error prints wrong spec HOT 1
- Introduce absolute path variant of zephyr.base HOT 13
- west cannot process a git branch name containing a single quote ' HOT 8
- west init access denied on windows HOT 2
- git: Add support for sparse checkout HOT 5
- Investigate if the performance of submodule update could be improved HOT 7
- west update loops infinitely over the first repository HOT 14
- West Re-Implementation - git ws
- west update - AttributeError: 'NoneType' object has no attribute 'err' HOT 1
- menuconfig aborting due to Kconfig warnings HOT 4
- Allow using reference repositories to share objects HOT 8
- Allow import of optional projects from manifest file HOT 7
- Moving from Zephyr 3.2.99 to 3.5.99: `west` cannot find its configuration file HOT 3
- --mr documents argument to be a revision HOT 1
- `pip install` fails on MSYS2 HOT 3
- Infinite loop when building in a moved directory HOT 4
- `die_if_no_git` not listed under west API 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 west.