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

Add missing double dashes #350

Merged
merged 1 commit into from
Aug 11, 2015
Merged

Add missing double dashes #350

merged 1 commit into from
Aug 11, 2015

Conversation

nobozo
Copy link
Contributor

@nobozo nobozo commented Aug 6, 2015

No description provided.

@madkite
Copy link
Contributor

madkite commented Aug 7, 2015

Why do you think it is missing? "--" is only needed to prevent misunderstanding between path and tree-ish if you omit the last one. In this case you have parameter "HEAD" before, so all other parameters are treated as paths (even if some filename will be the same as some tree-ish). Syntax allows you to always use "--", but there is no sense in it if you have already pass tree-ish.

@nobozo
Copy link
Contributor Author

nobozo commented Aug 10, 2015

Because this line is trying to show that the two highlighted commands are equivalent. Since the alias has the two dashes, then it makes sense to show them in the unaliased command. Whether or not they're needed in the first place is a different question.

@madkite
Copy link
Contributor

madkite commented Aug 11, 2015

You are right, I haven't noticed that alias contains dashes. Maybe it's better to remove these dashes from alias or add some explanation, because this is first time using dashes in "git reset" command from the beginning of the book. Or even remove "HEAD" (with leaving dashed) in order to show that this is default.

@nobozo
Copy link
Contributor Author

nobozo commented Aug 11, 2015

Since 'git reset' as a command hasn't really been discussed at all, I don't think it's relevant to explain why dashes are or aren't necessary. The text was just attempting to show how an alias relates to the unaliased equivalent.

@ben
Copy link
Member

ben commented Aug 11, 2015

Yeah, it's probably confusing to see the dashes above and not below. And @nobozo is right, we don't need to explain the intricacies of git reset here, but if someone happens upon this and copy-pastes it into their config, we want them to end up with the right alias, so the dashes are appropriate.

ben added a commit that referenced this pull request Aug 11, 2015
Add missing double dashes
@ben ben merged commit 5f486e9 into progit:master Aug 11, 2015
@nobozo nobozo deleted the patch-1 branch July 24, 2016 17:01
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.

3 participants