{"thread":{"id":"38805","subject":"GSoC 2015. Microprojects","startedAt":"2015-03-14T20:24:10Z","lastAt":"2015-03-15T02:59:08Z","messageCount":2,"participants":["Yurii Shevtsov","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"257685","messageId":"CAHLaBNLX8KGUhROzW80SiM507=YpbfqdSiPm7Vm9vwK6vW-Z+Q@mail.gmail.com","threadId":"38805","inReplyTo":null,"subject":"GSoC 2015. Microprojects","fromName":"Yurii Shevtsov","fromEmail":"ungetch@gmail.com","sentAt":"2015-03-14T20:24:10Z","receivedAt":"2015-03-14T20:24:10Z","isPatch":false,"sender":{"key":"ungetch@gmail.com","avatar":null},"body":"As I understood there are four unsolved microprojects. I think I can\ndeal with \"Make \"git diff --no-index $directory $file\" DWIM better\"\nbut I don't understand what exactly should I do. I tried to run 'git\ndiff --no-index ~/git/ diff.h' cmd on git sources but it says 'error:\nfile/directory conflict: /home/localhost/git/, diff.h'. I have used\ngit many times, but I'm not familiar with git diff. Thanks in advance!\n"},{"id":"257705","messageId":"xmqqtwxnufsz.fsf@gitster.dls.corp.google.com","threadId":"38805","inReplyTo":"CAHLaBNLX8KGUhROzW80SiM507=YpbfqdSiPm7Vm9vwK6vW-Z+Q@mail.gmail.com","subject":"Re: GSoC 2015. Microprojects","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-03-15T02:59:08Z","receivedAt":"2015-03-15T02:59:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yurii Shevtsov <ungetch@gmail.com> writes:\n\n> As I understood there are four unsolved microprojects. I think I can\n> deal with \"Make \"git diff --no-index $directory $file\" DWIM better\"\n> but I don't understand what exactly should I do.\n\nOK.\n\n> I tried to run 'git\n> diff --no-index ~/git/ diff.h' cmd on git sources but it says 'error:\n> file/directory conflict: /home/localhost/git/, diff.h'.\n\nThere you have it.  Do you think erroring out is useful?  \n\nImagine a user who is used to the way ordinary \"diff\" command (not\n\"git diff\") operates.  What would be the behaviour that may match\nthe expectation of such a user better?\n\nIn other words, if you have the source tree of git in ~/git and\nthen you have \"diff.h\" in your current directory, perhaps prepared\nby doing something like this:\n\n    $ cd $HOME\n    $ git clone git://git.kernel.org/pub/scm/git/git.git git\n    $ mkdir junk\n    $ cp git/diff.h junk\n    $ cd junk\n    $ echo hello >>diff.h\n\nwhat would the ordinary \"diff\" say when you do these commands (still\nin that ~/junk directory)?\n\n    $ diff -u ~/git diff.h\n    $ diff -u diff.h ~/git\n\nWouldn't it be wonderful if \"git diff --no-index\" worked the same\nway as these?\n"}]}