Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Ramkumar Ramachandra artag...@gmail.com writes: The SYNOPSIS lists the [--no-index] form as the last item, but the DESCRIPTION lists it as a natural extension of the first form. Perhaps either the description or your reading is wrong. The --no-index mode was a hack to allow git diff goodies to be used outside the context of git, and a proper execution of it should have been to send patches to GNU or BSD diff maintainers, not to add the --no-index option that is unrelated to git to our code. I think it is more correct to list it as a footnote and list separately from the main text, which is what the original SYNOPSIS section does. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Junio C Hamano wrote: The --no-index mode was a hack to allow git diff goodies to be used outside the context of git, and a proper execution of it should have been to send patches to GNU or BSD diff maintainers, not to add the --no-index option that is unrelated to git to our code. Yeah, I know. I use it instead of diff all the time. I think it is more correct to list it as a footnote and list separately from the main text, which is what the original SYNOPSIS section does. I was trying to be more correct here. The form is a special case of the first form where the number of paths are limited to two. Besides, isn't that how the DESCRIPTION section explains it now? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Ramkumar Ramachandra wrote: The form is a special case of the first form where the number of paths are limited to two. Besides, isn't that how the DESCRIPTION section explains it now? Sort of. It's a completely different form, but when --no-index is left out the syntax is a special case of git diff -- path Maybe it would make sense to move towards eliminating the implicit --no-index for paths outside the repository trick. I use git diff --no-index all the time, but I always spell it out to be careful. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Jonathan Nieder wrote: Maybe it would make sense to move towards eliminating the implicit --no-index for paths outside the repository trick. I use git diff --no-index all the time, but I always spell it out to be careful. Huh? Why do you want to endure the pain of spelling it out, when your intent is perfectly clear? What would make sense is a tristate diff.no-index: inside-worktree|outside-worktree|always. I don't know why we should even have a never. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Ramkumar Ramachandra wrote: Jonathan Nieder wrote: Maybe it would make sense to move towards eliminating the implicit --no-index for paths outside the repository trick. I use git diff --no-index all the time, but I always spell it out to be careful. Huh? Why do you want to endure the pain of spelling it out, when your intent is perfectly clear? Because typing paths does not make my intent perfectly clear. What would make sense is a tristate diff.no-index: Oh please no. Hope that helps, Jonathan -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Jonathan Nieder wrote: Oh please no. If I understand this correctly, you are horrified by this? https://github.com/artagnon/dotfiles/blob/master/.gitconfig#L30 By the way, my zsh aliases git to g. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Ramkumar Ramachandra wrote: Jonathan Nieder wrote: Oh please no. If I understand this correctly, you are horrified by this? https://github.com/artagnon/dotfiles/blob/master/.gitconfig#L30 Nope, that looks like a useful way to save typing, and git help helpfully expands any of your custom commands when you want to translate in order to help other people. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Jonathan Nieder wrote: Because typing paths does not make my intent perfectly clear. I'm not able to understand this. Doesn't your prompt tell you which directory you're in, and if you're in a git repository? When you type out paths, you know what is inside and what is outside your repository. By extension, you know when --no-index is implied and when it isn't. Can you explain what your problem is? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Ramkumar Ramachandra wrote: Jonathan Nieder wrote: Because typing paths does not make my intent perfectly clear. I'm not able to understand this. Doesn't your prompt tell you which directory you're in, and if you're in a git repository? When you type out paths, you know what is inside and what is outside your repository. By extension, you know when --no-index is implied and when it isn't. Can you explain what your problem is? Are you wondering why I use --no-index or why I think we should eventually stop moving into --no-index mode by default? The answers are different. I use --no-index because it means I don't have to think about whether the files I am comparing are in a Git repository. It's relaxing. I'm not advocating that you follow suit; I'm just describing my own usage of the command. I think git should eventually stop doing --no-index implicitly because it is a very different mode using the same syntax triggered by external conditions. That is * hard to document * problematic for scripts calling git diff, can create lurking bugs * unnecessarily complicated. For example: * git diff -h output depends on whether I am in a git worktree. * git searches for a .git directory, possibly hitting filesystem automount points, just to decide whether its arguments are inside the current repository. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Jonathan Nieder wrote: * hard to document [...] I completely disagree, but we don't have to agree: make it a configuration variable. Even if it's turned to never by default, I don't mind having one extra line in my .gitconfig. But you went all Oh please no when I brought it up. I thought you were claiming that nobody finds it useful. Now, you seem to be claiming that people who find it useful must suffer. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] git-diff.txt: fix ordering of the [--no-index] form
Ramkumar Ramachandra wrote: I completely disagree, but we don't have to agree: make it a configuration variable. I thought we had discussed before how every configuration variable costs quite a lot in terms of Git's teachability. What would that configuration variable even mean? Set this to make other people's scripts work when they assume --no-index won't be triggered automatically? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html