Skip to content
New issue

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

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

Already on GitHub? # to your account

check breakages: fail loudly when unable to checkout tag #1060

Merged
merged 1 commit into from
Jul 9, 2019

Conversation

ktoso
Copy link
Member

@ktoso ktoso commented Jul 9, 2019

One line description of your change

Motivation:

When using the script ad hoc to verify something you may have forgotten to pull all tags,
the script then fails mysteriously in silence and no output. Detective work can then lead the script mysteriously stopping after a checkout:

+ cd /tmp/.check-api_1Q1rvO/repo
+ git checkout 1.1.0
$ ...

which reminds you to perform a fetch; it would be nicer if it told us about the issue explicitly though.

Modifications:

Don't silence git checkout all error output, though use quiet mode so no progress is printed.

Result:

Script fails nicer and reminds you to perform a git fetch if you forgot to do so.

e.g.

[5/5] Merging module Metrics
error: pathspec '1.1.0' did not match any file(s) known to git

One line description of your change

Motivation:

When using the script ad hoc to verify something you may have forgotten to pull all tags,
the script then fails mysteriously in silence and no output. Detective work can then lead the script mysteriously stopping after a checkout:

```
+ cd /tmp/.check-api_1Q1rvO/repo
+ git checkout 1.1.0
$ ...
```

which reminds you to perform a fetch; it would be nicer if it told us about the issue explicitly though.

Modifications:

Don't silence `git checkout` all error output, though use quiet mode so no progress is printed.

Result:

Script fails nicer and reminds you to perform a git fetch if you forgot to do so.

e.g.

```
[5/5] Merging module Metrics
error: pathspec '1.1.0' did not match any file(s) known to git
```
Copy link
Member

@weissi weissi left a comment

Choose a reason for hiding this comment

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

Thank you!!

@weissi weissi merged commit ed3bca3 into apple:master Jul 9, 2019
@ktoso ktoso deleted the patch-3 branch July 10, 2019 01:45
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants