{"thread":{"id":"1320","subject":"(unknown)","startedAt":"2005-07-23T09:10:51Z","lastAt":"2005-07-23T09:10:51Z","messageCount":1,"participants":["Junio Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"6376","messageId":"7vek9phorr.fsf@totally-fudged-out-message-id","threadId":"1320","inReplyTo":null,"subject":"(unknown)","fromName":"Junio Hamano","fromEmail":"junio@twinsun.com","sentAt":"2005-07-23T09:10:51Z","receivedAt":"2005-07-23T09:10:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">From nobody Sat Jul 23 02:08:27 2005\nTo: Ryan Anderson <ryan@michonline.com>\nCc: git@vger.kernel.org\nSubject: Re: [PATCH] Add git-find-new-files to spot files added to the tree,\n but not the repository\nBcc: junkio@cox.net\nReferences: <20050723074219.GB3255@mythryan2.michonline.com>\nFrom: Junio C Hamano <junio@twinsun.com>\nDate: Sat, 23 Jul 2005 02:10:51 -0700\nUser-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)\nMIME-Version: 1.0\nContent-Type: text/plain; charset=us-ascii\n\nRyan Anderson <ryan@michonline.com> writes:\n\n> Add git-find-new-files to find files that are in the tree, but\n> not checked into the repository.\n\nYou _ought_ to be able to just say:\n\n $ git-ls-files --others --exclude-from=<exclude pattern file>\n\nand be done with it.  Also please see the thread about Cogito\nand StGIT's use of .gitignore and .git/exclude files.\n\nThe current implementation of \"git-ls-files\" exclude mechanism\nmay have rooms for improvements; the last time I checked, it\nonly did the matching of patterns against filename without\nleading directories).  The world will be a better place if\nsomebody extends it, instead of working around its limitation.\n\nI may be tempted to doing it myself, but I'm in the middle of\nsomething else, so ...\n\n> +#\tfind . -name .git -type d -prune -o -type f -print \\\n> +#\t\t| grep -v -e .tree1 -e .tree2 \\\n> +#\t\t| sed -e \"s/^\\.\\///\" \\\n> +#\t\t| sort >.tree1\n> +#\tgit-ls-files | grep -v -e .tree1 -e .tree2 \\\n> +#\t\t| sort >.tree2\n> +#\tdiff -u .tree1 .tree2\n\nIt does not matter since the above is just an example and I\nthink you should be able to just use \"ls-files --others\", but\njust FYI, you could have written \"comm -23 .tree1 .tree2\" above\ninstead of \"diff -u\".\n"}]}