Re: GSoC 2015. Microprojects
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 15, 2015, 02:59 UTC
- Message-ID
- <xmqqtwxnufsz.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAHLaBNLX8KGUhROzW80SiM507=YpbfqdSiPm7Vm9vwK6vW-Z+Q@mail.gmail.com>
Yurii Shevtsov <ungetch@gmail.com> writes:
> As I understood there are four unsolved microprojects. I think I can > deal with "Make "git diff --no-index $directory $file" DWIM better" > but I don't understand what exactly should I do.
OK.
> I tried to run 'git > diff --no-index ~/git/ diff.h' cmd on git sources but it says 'error: > file/directory conflict: /home/localhost/git/, diff.h'.
There you have it. Do you think erroring out is useful?
Imagine a user who is used to the way ordinary "diff" command (not "git diff") operates. What would be the behaviour that may match the expectation of such a user better?
In other words, if you have the source tree of git in ~/git and then you have "diff.h" in your current directory, perhaps prepared by doing something like this:
$ cd $HOME
$ git clone git://git.kernel.org/pub/scm/git/git.git git
$ mkdir junk
$ cp git/diff.h junk
$ cd junk
$ echo hello >>diff.hwhat would the ordinary "diff" say when you do these commands (still in that ~/junk directory)?
$ diff -u ~/git diff.h
$ diff -u diff.h ~/gitWouldn't it be wonderful if "git diff --no-index" worked the same way as these?