{"thread":{"id":"7450","subject":"problems of git-status","startedAt":"2007-03-28T07:59:16Z","lastAt":"2007-03-28T08:57:46Z","messageCount":2,"participants":["Liu Yubao","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"38237","messageId":"460A2054.20404@gmail.com","threadId":"7450","inReplyTo":null,"subject":"problems of git-status","fromName":"Liu Yubao","fromEmail":"yubao.liu@gmail.com","sentAt":"2007-03-28T07:59:16Z","receivedAt":"2007-03-28T07:59:16Z","isPatch":false,"sender":{"key":"yubao.liu@gmail.com","avatar":null},"body":"Hi,\n   I find \"git status\" and \"git status .\" have different output and the latter\nwill go wrong in the case below:\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n#!/bin/sh\nrm -rf tt; mkdir tt; cd tt\n\ngit init\nmkdir AA\necho hello>a\ngit add .\necho world>a\n\necho \"different output...\"\necho \"--------------------git status-------------\"\ngit status\necho \"--------------------git status . ----------\"\ngit status .\n\ngit add a\ngit commit -m \"test\"\necho hello world>a\ngit add a\nsleep 4\necho world hello>a\necho \"--------------------git status-------------\"\ngit status\necho \"--------------------git status . ----------\"\ngit status .\n\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\nI use git version 1.5.1.rc2.15.g465b3, \"git repo-config -l\" shows:\n\tcore.filemode=false\n\tcore.logallrefupdates=true\n\tcore.compression=9\n\tdiff.color=auto\n\tpack.window=64\n\tmerge.summary=true\n\tcore.repositoryformatversion=0\n\tcore.filemode=false\n\tcore.bare=false\n\n\nHere is the output of that script:\n\nInitialized empty Git repository in .git/\ndifferent output...\n--------------------git status-------------\n# On branch master\n#\n# Initial commit\n#\n# Changes to be committed:\n#   (use \"git rm --cached <file>...\" to unstage)\n#\n#\tnew file: a\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#\n#\tmodified:   a\n#\n--------------------git status . ----------\n# On branch master\n#\n# Initial commit\n#\n# Changes to be committed:\n#   (use \"git rm --cached <file>...\" to unstage)\n#\n#\tnew file: a\n#\nCreated initial commit dc57cb444335e73ce3320c1e368765b1a92e3be5\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 a\n--------------------git status-------------\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#\tmodified:   a\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#\n#\tmodified:   a\n#\n--------------------git status . ----------\nfatal: Entry 'a' not uptodate. Cannot merge.\n"},{"id":"38238","messageId":"7vy7lhkanp.fsf@assigned-by-dhcp.cox.net","threadId":"7450","inReplyTo":"460A2054.20404@gmail.com","subject":"Re: problems of git-status","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-28T08:57:46Z","receivedAt":"2007-03-28T08:57:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Liu Yubao <yubao.liu@gmail.com> writes:\n\n>    I find \"git status\" and \"git status .\" have different output. \n\nThink of \"git status $ANY_ARGUMENTS\" a preview of \"git commit\n$ANY_ARGUMENTS\".  If you have local modifications, \"git commit\"\nand \"git commit .\" would do different things, so corresponding\n\"git status\" should give you different output.\n\nBy giving \".\" to git status, the latter form is asking what\nreminder message you would see in the commit log message buffer\nif you say \"git commit .\"\n"}]}