git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: being nice to patch(1)

From
David Kastrup <dak@gnu.org>
Date
Jul 3, 2007, 13:54 UTC
Message-ID
<86hcolr3sb.fsf@lola.quinscape.zz>
In-Reply-To
<Pine.LNX.4.64.0707031437560.4071@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 29 quoted lines
> Hi David,
>
> [please Cc me, since I will be more likely to miss replies if you do not]
>
> On Tue, 3 Jul 2007, David Kastrup wrote:
>
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> 
>> > But maybe they would be willing to install git to get that wonderful 
>> > git-apply program, and that wonderful rename-and-mode-aware git-diff, 
>> > and the git-merge-file program, all of which can operate outside of a 
>> > git repository. (Take that, hg!)
>> 
>> As long as git-diff lists all added files in a second non-git dirtree
>> as "/dev/null" when doing
>> git-diff --name-status -B -M -C dir1 dir2
>> its usefulness is limited.
>> 
>> git-diff --name-status -B -M -C dir1 dir2
>> D	dir1/auctex-11.84/CHANGES
>> D	dir1/auctex-11.84/COPYING
>> D	dir1/auctex-11.84/ChangeLog
>> 
>> [...]
>
> Yes, directories are a problem. There our DWIMery does not really help. 
> But there is a solution: say
>
> 	git diff --name-status --no-index -B -M -C dir1 dir2

It would help if you actually read what you are replying to. The problem is that added files are listed as "/dev/null", and --no-index does not make a difference here. It actually makes no apparent difference at all when outside of a non-git dirtree. Hardly surprising, since no index file that could be consulted is present in the first place.

The output still is (editing somewhat more so that it becomes even more obvious):

git-diff -B -M -C --no-index --name-status dir1 dir2 D dir1/auctex-11.84/CHANGES

[...]

A /dev/null A /dev/null R100 dir1/auctex-11.84/images/amstex.xpm dir2/etc/auctex/images/amstex.xpm

[...]
_All_ lines starting in A end with /dev/null.
-- 
David Kastrup
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 19 of 32 in “being nice to patch(1)”
  1. Andrew MortonJul 2, 2007
  2. Linus TorvaldsJul 2, 2007
  3. Andrew MortonJul 2, 2007
  4. Linus TorvaldsJul 2, 2007
  5. Andrew MortonJul 2, 2007
  6. Linus TorvaldsJul 3, 2007
  7. Junio C HamanoJul 3, 2007
  8. Linus TorvaldsJul 3, 2007
  9. Johannes SchindelinJul 3, 2007
  10. Paolo CiarrocchiJul 3, 2007
  11. Johannes SchindelinJul 3, 2007
  12. Theodore TsoJul 3, 2007
  13. Linus TorvaldsJul 3, 2007
  14. Paul EggertJul 3, 2007
  15. Linus TorvaldsJul 3, 2007
  16. Linus TorvaldsJul 3, 2007
  17. David KastrupJul 3, 2007
  18. Johannes SchindelinJul 3, 2007
  19. David KastrupJul 3, 2007
  20. diff --no-index: fix --name-status with added filesJohannes Schindelin, Jul 3, 2007
  21. Johannes SchindelinJul 3, 2007
  22. David KastrupJul 3, 2007
  23. David KastrupJul 6, 2007
  24. git-diff memory/speed/disk impacts (was: being nice to patch(1))David Kastrup, Jul 6, 2007
  25. Linus TorvaldsJul 6, 2007
  26. Andreas GruenbacherJul 3, 2007
  27. Andrew MortonJul 3, 2007
  28. Linus TorvaldsJul 3, 2007
  29. Andreas GruenbacherJul 3, 2007
  30. Andrew MortonJul 3, 2007
  31. Andrew MortonJul 3, 2007
  32. Andrew MortonJul 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.