Comments (3)
One way we could check strictly with git
and without a git fetch
is to use git remote show …
.
Part of the last line of git remote show …
will always say either local out of date
or up to date
.
To get the info we’d need and regardless of the remote names or how many the user has, we could do:
for remote in $(git remote show | xargs); do \
echo "$remote: $(git remote show $remote | tail -n1 | xargs)"; \
done
And for the normal case if the local clone is out of date with the remote that will just report this:
origin: master pushes to master (local out of date)
And If the user has multiple remotes configured, an additional line like that for each remote.
So we could grep the output of for each local out of date
and then report to the user:
Your local clone is out of date with the "origin" remote.
Run "git pull" to bring your local up to date with the "origin" remote.
from html-build.
After thinking about this some more, I think we can better get what we’d need with just this:
git remote show $(git remote -v \
| grep "https://github.com/whatwg/html.git (fetch)" | cut -f1) \
| grep "pushes to master" | xargs
That’ll give just the info for the master
branch of the whatwg repo. We could then word the message as:
Your local clone is out of date with the WHATWG remote repo.
To bring your local up to date with the WHATWG remote, run this:
git checkout master && git remote pull https://github.com/whatwg/html.git master
from html-build.
A problem with the git remote show
approaches is that it'll just tell you the status of the master branch. If people are on a PR branch that's far behind master, it doesn't catch that.
I think that git fetch https://github.com/whatwg/html master
and some fiddling with FETCH_HEAD
should work, though.
from html-build.
Related Issues (20)
- Update highlighter once it updates widlparser
- Build does not fail on invalid Web IDL HOT 5
- Review Drafts have MDN in them; they should not HOT 2
- --password warning HOT 2
- MDN boxes sometimes have multiple entries for the same browser HOT 3
- Remove caniuse boxes in favor of MDN compat data boxes? HOT 9
- Build failing, potentially Python? HOT 2
- Migrate to Python 3 HOT 2
- Use Docker Hub pdfsizeopt instead of downloading from GitHub
- Document why macOS cannot do HTTP/2 by default HOT 2
- Consider a "fast mode" for local iteration HOT 3
- .pre-process-main.pl can be simplified or rolled into Wattsi HOT 2
- Add service worker support
- html-build repo is missing License text file
- "Improvements to the CI Docker build" broken PDF links HOT 1
- `.cache` folder is not created by `build.sh` HOT 1
- Docker build fails on M1 MacBook HOT 5
- Build failing locally when trying to send to server HOT 1
- Local build doesn't catch HTML parsing errors
- Automatically generate bibliography entries
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 html-build.