Giter VIP home page Giter VIP logo

mismas's People

Watchers

 avatar  avatar  avatar

Forkers

daveclifford

mismas's Issues

rebase_myfork_rear.sh does not match documentation on relax-and-recover.org

The 'Contributing' documentation on relax-and-recover.org
http://relax-and-recover.org/development/
reads

Merging the upstream/master with your local branch ...
...
# Checkout your local 'master' branch.
$ git checkout master

# Synchronize your local repository with 'upstream/master', so that you have all the latest changes.
$ git fetch upstream

but
https://github.com/gdha/mismas/blob/master/rebase_myfork_rear.sh
implements

echo "
Show current branch - should be master"
git branch
echo "
Fetch upstream
"
git fetch upstream

and no way for the user to intervene if his current branch is not master.

I suggest that rebase_myfork_rear.sh either implements
what is documented i.e.

echo "
Checkout local 'master' branch
"
git checkout master
echo "
Fetch upstream
"
git fetch upstream

or it checks that the current local branch is 'master' like

echo "
Check that current local branch is 'master'
"
if ! test master = $( git branch | cut -s -d '*' -f 2 ) ; then
   echo "Error: Current local branch is not 'master'"
   exit 1
fi
echo "
Fetch upstream
"
git fetch upstream

In general rebase_myfork_rear.sh does not check
if any 'git' command failed but blindly proceeds.
I think 'set -e' could be actually useful in this case
to not blindly proceed after there was an error.

By the way and for the fun of it:
Initially I had tried to get what the current local branch is via

current_branch=( $( git branch | grep '^* ' ) )

but

echo "${current_branch[@]}"

shows that the current_branch array elements are technically right
but not what I had offhandedly expected ;-)
For even more fun with it:
There is intentionally no usual string quoting "..." in

test master = $( git branch | cut -s -d '*' -f 2 ) 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.