Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Tools integration #1

Merged
merged 14 commits into from
Dec 23, 2015
Merged

Git Tools integration #1

merged 14 commits into from
Dec 23, 2015

Conversation

pspoerri
Copy link
Contributor

No description provided.

@pspoerri
Copy link
Contributor Author

@andyspiros can you review this?

else
if [[ -z ${host} ]]; then
exitError 654 ${LINENO} "host is not defined"
fi
# workaround for Todi, Daint, and Lema
# workaround for Todi, Daint, and Lema
if [ "${host}" == "lema" -o "${host}" == "todi" -o "${host}" == "daint" ] ; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file already exists on svn.

if [ -z "${path}" ] ; then
path=$(pwd)
fi
echo $(git -C "${path}" branch 2> /dev/null | sed -n '/^\*/s/^\* //p')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git -C $path rev-parse --abbrev-ref HEAD is probably easier.

@andyspiros
Copy link

I'm done with the review. I suppose you tested it all, right? It's fine from my point of view. Just consider those few question I asked, then you can merge.

@pspoerri
Copy link
Contributor Author

Great thank you!

I added these changes:

  • A nicer path function that avoids the copy & paste
  • A check function that shows an error message if $path is not a git repository and then aborts
  • Further tests

I further expanded my test function to test the implementation ;)

@pspoerri
Copy link
Contributor Author

I removed the function call to the test function to avoid showing the selftest every time the function is run ;

pspoerri added a commit that referenced this pull request Dec 23, 2015
@pspoerri pspoerri merged commit 5da07da into C2SM-RCM:master Dec 23, 2015
@pspoerri pspoerri deleted the gitmodules branch December 23, 2015 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants