[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread ijuma
GitHub user ijuma opened a pull request:

https://github.com/apache/spark/pull/7569

[MINOR][BUILD] Restore to previous branch instead of detached commit

The right command to get the branch name is `git rev-parse --abbrev-ref 
HEAD`
instead of `git rev-parse HEAD`. The latter returns the commit hash causing
a detached branch when we checkout to it.

We are using the same script (with some modifications) in Kafka and that is 
how the issue was noticed.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ijuma/spark merge-script-fix-restore-to-branch

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/7569.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #7569


commit 18b9eab685e09b6ec19b2fd6e46d659f1882189e
Author: Ismael Juma 
Date:   2015-07-21T08:18:15Z

[MINOR][BUILD] Restore to previous branch instead of detached commit

The right command to get the branch name is `git rev-parse --abbrev-ref 
HEAD`
instead of `git rev-parse HEAD`. The latter returns the commit hash causing
a detached branch when we checkout to it.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123212549
  
Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread AmplabJenkins
Github user AmplabJenkins commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123212882
  
Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread srowen
Github user srowen commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123218611
  
CC @JoshRosen I don't know enough to know, but I suspect of course you're 
right if you've been using this successfully. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread ijuma
Github user ijuma commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-12397
  
@srowen, some output for context:

```
~/s/spark ❯❯❯ git rev-parse --abbrev-ref HEAD 
 merge-script-fix-restore-to-branch
merge-script-fix-restore-to-branch
~/s/spark ❯❯❯ git rev-parse HEAD  
 merge-script-fix-restore-to-branch
18b9eab685e09b6ec19b2fd6e46d659f1882189e
```

Interested to hear from @JoshRosen if the current behaviour is intentional 
or just an oversight. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread JoshRosen
Github user JoshRosen commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123429726
  
@ijuma I'm fairly certain that the current behavior is an oversight. I find 
the current behavior to be pretty annoying, so I'm glad that someone finally 
fixed this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread ijuma
Github user ijuma commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123431612
  
@JoshRosen Great. :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread JoshRosen
Github user JoshRosen commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123439013
  
Actually, there seems to be one corner-case:

```
git rev-parse --abbrev-ref HEAD
``` 

returns `HEAD` when I'm already checked out to a detached head prior to 
invoking the merge script.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-21 Thread ijuma
Github user ijuma commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123446563
  
What would be the desired behaviour in that case? The existing one?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-22 Thread JoshRosen
Github user JoshRosen commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-123814178
  
As a user, I'd like it if the behavior returned me back to whatever 
`__git_ps1` displays.  Here's an excerpt from the relevant bash code:

```bash
local g="$(git rev-parse --git-dir 2>/dev/null)"
[...]
if ! b="$(git symbolic-ref HEAD 2>/dev/null)"
then
if ! b="$(git describe --exact-match HEAD 2>/dev/null)"
then
b="$(cut -c1-7 "$g/HEAD")..."
fi
fi
```

I think that `__git_ps1`'s policy is something like this:

- If you are checked out to a tag (which can be detected using `git 
describe --exact-match HEAD`), then display that tag name.
- Otherwise, grab the identifier from `.git/HEAD`.
  - If you are checked out to a branch like `master`, then this will 
contain something like `ref: refs/heads/master`, so you'll have to strip off 
the appropriate prefix.
  - If you are checked out to a detached head, then this will contain only 
a SHA.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-23 Thread ijuma
Github user ijuma commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-124123399
  
@JoshRosen, fair enough. Would you like to propose a PR and I can close 
this one? :) This doesn't really affect me and I don't have free cycles at this 
point.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-27 Thread JoshRosen
Github user JoshRosen commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-125277581
  
I also don't really have time to work on this, so I've filed 
https://issues.apache.org/jira/browse/SPARK-9383 so that someone else can 
follow up on it later.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-27 Thread ijuma
Github user ijuma closed the pull request at:

https://github.com/apache/spark/pull/7569


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request: [MINOR][BUILD] Restore to previous branch inst...

2015-07-27 Thread ijuma
Github user ijuma commented on the pull request:

https://github.com/apache/spark/pull/7569#issuecomment-125282944
  
OK, closing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org