{"thread":{"id":"4352","subject":"[PATCH] git status: print files under untracked dir if -a is given","startedAt":"2006-05-30T08:46:17Z","lastAt":"2006-05-30T12:55:16Z","messageCount":3,"participants":["Yasushi SHOJI","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"20966","messageId":"87slmrdhe6.wl@mail2.atmark-techno.com","threadId":"4352","inReplyTo":null,"subject":"[PATCH] git status: print files under untracked dir if -a is given","fromName":"Yasushi SHOJI","fromEmail":"yashi@atmark-techno.com","sentAt":"2006-05-30T08:46:17Z","receivedAt":"2006-05-30T08:46:17Z","isPatch":true,"sender":{"key":"yashi@atmark-techno.com","avatar":"https://gravatar.com/avatar/4817e8703ac4379935834d87453faa9d0c94b9dc19d83fcc54c67875eb133e59?d=mp&s=160"},"body":"git status: print files under untracked dir if -a is given\n\ngit status (git-commit.sh) currently doesn't show files under\nuntracked directory.  this is inconvenient when adding many files\nunder new directory.\n\nthis patch change its behavior to show files under untracked directory\nif option --all is given.\n\nSigned-off-by: Yasushi SHOJI <yashi@atmark-techno.com>\n\n---\n\n3d3fa8f19c7d9b03b1a6e510970633ec8be7adac\n git-commit.sh |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\n3d3fa8f19c7d9b03b1a6e510970633ec8be7adac\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 6ef1a9d..0cde305 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -134,13 +134,18 @@ #'\n \treport \"Changed but not updated\" \\\n \t    \"use git-update-index to mark for commit\"\n \n+\tif test -z \"$all\"\n+\tthen\n+\t    directory_opt=\"--directory\"\n+\tfi\n+\n \tif test -f \"$GIT_DIR/info/exclude\"\n \tthen\n-\t    git-ls-files -z --others --directory \\\n+\t    git-ls-files -z --others $directory_opt \\\n \t\t--exclude-from=\"$GIT_DIR/info/exclude\" \\\n \t\t--exclude-per-directory=.gitignore\n \telse\n-\t    git-ls-files -z --others --directory \\\n+\t    git-ls-files -z --others $directory_opt \\\n \t\t--exclude-per-directory=.gitignore\n \tfi |\n \tperl -e '$/ = \"\\0\";\n-- \n1.3.3.g70f7\n"},{"id":"20968","messageId":"7vfyir26v4.fsf@assigned-by-dhcp.cox.net","threadId":"4352","inReplyTo":"87slmrdhe6.wl@mail2.atmark-techno.com","subject":"Re: [PATCH] git status: print files under untracked dir if -a is given","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-30T09:34:55Z","receivedAt":"2006-05-30T09:34:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yasushi SHOJI <yashi@atmark-techno.com> writes:\n\n> git status: print files under untracked dir if -a is given\n>\n> git status (git-commit.sh) currently doesn't show files under\n> untracked directory.  this is inconvenient when adding many files\n> under new directory.\n>\n> this patch change its behavior to show files under untracked directory\n> if option --all is given.\n>\n> Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>\n\nI do not quite understand your rationale behind linking -a and\n\"show untracked\" behaviour.  In many cases, after modifying\nmultiple files \"commit -a\" is the preferred way to make commits\nfor people who keep their tree clean (meaning, they do not leave\nunrelated changes to their working tree files), and I suspect\nyour change would clutter their commit log buffer with unrelated\nfiles they did not ask to see.\n\nAt least this would make things somewhat unpleasant for me to\nuse, since I do \"commit -a\" often and I have my random notes\nfiles under ./+trash subdirectory of the main project (yes, I\nknow I could add /+trash to .gitignore).\n\nWe have something different but perhaps related by Matthias\nLederhofer to add \"git status --untracked\" since you did this\npatch.\n\n        commit 443f8338b9e248353a7095a1096684f1ed106c66\n        Author: Matthias Lederhofer <matled@gmx.net>\n        Date:   Mon May 22 23:02:06 2006 +0200\n\nDoes it solve your problem?\n"},{"id":"20971","messageId":"87r72bd64r.wl@mail2.atmark-techno.com","threadId":"4352","inReplyTo":"7vfyir26v4.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git status: print files under untracked dir if -a is given","fromName":"Yasushi SHOJI","fromEmail":"yashi@atmark-techno.com","sentAt":"2006-05-30T12:55:16Z","receivedAt":"2006-05-30T12:55:16Z","isPatch":true,"sender":{"key":"yashi@atmark-techno.com","avatar":"https://gravatar.com/avatar/4817e8703ac4379935834d87453faa9d0c94b9dc19d83fcc54c67875eb133e59?d=mp&s=160"},"body":"Hi Junio,\n\nAt Tue, 30 May 2006 02:34:55 -0700,\nJunio C Hamano wrote:\n> \n> Yasushi SHOJI <yashi@atmark-techno.com> writes:\n> \n> > git status: print files under untracked dir if -a is given\n> >\n> > git status (git-commit.sh) currently doesn't show files under\n> > untracked directory.  this is inconvenient when adding many files\n> > under new directory.\n> >\n> > this patch change its behavior to show files under untracked directory\n> > if option --all is given.\n> >\n> > Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>\n> \n> I do not quite understand your rationale behind linking -a and\n> \"show untracked\" behaviour.  In many cases, after modifying\n> multiple files \"commit -a\" is the preferred way to make commits\n> for people who keep their tree clean (meaning, they do not leave\n> unrelated changes to their working tree files), and I suspect\n> your change would clutter their commit log buffer with unrelated\n> files they did not ask to see.\n\nI assumed \"--all\" to mean \"every single file under a working dir\nexcept ignored\". so I thought users of \"commit -a\" wouldn't mind to\nsee files under untracked dir. \n\nbut I was wrong. man page clearly states that \"... new files you have\nnot told git about are not affected.\"\n\n# I admit I haven't used -a with commit because of my\n# misunderstanding. it's nice to know the option is much safer than I\n# expected.\n\n> At least this would make things somewhat unpleasant for me to\n> use, since I do \"commit -a\" often and I have my random notes\n> files under ./+trash subdirectory of the main project (yes, I\n> know I could add /+trash to .gitignore).\n\nI wasn't expecting that usage.\n\n> We have something different but perhaps related by Matthias\n> Lederhofer to add \"git status --untracked\" since you did this\n> patch.\n> \n>         commit 443f8338b9e248353a7095a1096684f1ed106c66\n>         Author: Matthias Lederhofer <matled@gmx.net>\n>         Date:   Mon May 22 23:02:06 2006 +0200\n> \n> Does it solve your problem?\n\nyes, it perfectly does.\n\nthanks,\n--\n       yashi\n"}]}