{"thread":{"id":"22811","subject":"[BUG] bugs in clean, status, bisect, and send-email","startedAt":"2010-02-25T03:28:41Z","lastAt":"2010-02-25T07:07:49Z","messageCount":3,"participants":["Mark Lodato","Junio C Hamano","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"135649","messageId":"ca433831002241928hef29dadu39f93bc1a8460331@mail.gmail.com","threadId":"22811","inReplyTo":null,"subject":"[BUG] bugs in clean, status, bisect, and send-email","fromName":"Mark Lodato","fromEmail":"lodatom@gmail.com","sentAt":"2010-02-25T03:28:41Z","receivedAt":"2010-02-25T03:28:41Z","isPatch":false,"sender":{"key":"lodatom@gmail.com","avatar":"https://avatars.githubusercontent.com/u/58860?v=4"},"body":"I noticed the following four bugs but don't have time to investigate\nfurther, let alone make test cases or fix them.  If someone else wants\nto tackle these, great.  If not, I'll try to research them more when I\nget free time, which won't be for a while.\n\nAll of the following have been tested with git 1.7.0, and the first\nthree examples use a new, empty repository.\n\n$ mkdir test_dir\n$ cd test_dir\n$ git init\n\n\n1. git-clean removes directories when a glob partially matches\n\nIf the pathspec given to 'git clean' has the potential to match a file\nin a subdirectory (even if no matching file exists in that directory),\nthe entire directory is removed.  In the following example, none of\nthe commands should try to remove dir/.\n\n$ mkdir dir\n$ touch dir/file\n$ git clean -nd 'x*'\n$ git clean -nd '*.c'\nWould remove dir/\n$ git clean -nd 'd*j'\nWould remove dir/\n\n\n2. git-status globs only match untracked files, not staged or unmodified\n\nThe last command should show that b.c is staged and modified, but\ninstead it shows absolutely nothing.  If this is intended behavior,\nit's certainly not what I would expect.\n\n$ touch a.txt b.c\n$ git status\n# On branch master\n#\n# Initial commit\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       a.txt\n#       b.c\nnothing added to commit but untracked files present (use \"git add\" to track)\n$ git status -- '*.c'\n# On branch master\n#\n# Initial commit\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       b.c\nnothing added to commit but untracked files present (use \"git add\" to track)\n$ git add b.c\n$ echo foo >> b.c\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#       new file:   b.c\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#       modified:   b.c\n#\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       a.txt\n$ git status -- '*.c'\n# On branch master\n#\n# Initial commit\n#\nnothing to commit (create/copy files and use \"git add\" to track)\n\n\n3. git-send-email does not accept -h option\n\nAll other git sub-commands accept -h, so it would probably be a good\nidea to implement it for 'git send-email' as well.\n\n$ git send-email -h\nusage: git format-patch [options] [<since> | <revision range>]\n\n    -n, --numbered        use [PATCH n/m] even with a single patch\n    -N, --no-numbered     use [PATCH] even with multiple patches\n    -s, --signoff         add Signed-off-by:\n    --stdout              print patches to standard out\n    --cover-letter        generate a cover letter\n    --numbered-files      use simple number sequence for output file names\n    --suffix <sfx>        use <sfx> instead of '.patch'\n    --start-number <n>    start numbering patches at <n> instead of 1\n    --subject-prefix <prefix>\n                          Use [<prefix>] instead of [PATCH]\n    -o, --output-directory <dir>\n                          store resulting files in <dir>\n    -k, --keep-subject    don't strip/add [PATCH]\n    --no-binary           don't output binary diffs\n    --ignore-if-in-upstream\n                          don't include a patch matching a commit upstream\n    -p, --no-stat         show patch format instead of default (patch + stat)\n\nMessaging\n    --add-header <header>\n                          add email header\n    --cc <email>          add Cc: header\n    --in-reply-to <message-id>\n                          make first mail a reply to <message-id>\n    --attach[=<boundary>]\n                          attach the patch\n    --inline[=<boundary>]\n                          inline the patch\n    --thread[=<style>]    enable message threading, styles: shallow, deep\n\nformat-patch -o /tmp/ipOBB8AaCU -h: command returned error: 129\n\n\n4. git-bisect fails if a pathspec is given that matches no commits\n\nIt says there are -1 revisions left.  I have no idea what it does\nafter that.  The following example uses git.git.\n\n$ git bisect start v1.7.0 v1.6.6 -- 'foobar'\nBisecting: -1 revisions left to test after this (roughly 0 steps)\n[f2a37151d4624906e34a9bcafb2ad79d0e8cb7ec] Fix memory leak in helper\nmethod for disconnect\n"},{"id":"135651","messageId":"7v1vgaq7ld.fsf@alter.siamese.dyndns.org","threadId":"22811","inReplyTo":"ca433831002241928hef29dadu39f93bc1a8460331@mail.gmail.com","subject":"Re: [BUG] bugs in clean, status, bisect, and send-email","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-25T04:09:50Z","receivedAt":"2010-02-25T04:09:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mark Lodato <lodatom@gmail.com> writes:\n\n> 2. git-status globs only match untracked files, not staged or unmodified\n\nI am reasonably sure that this is related to a n issue we discussed on\n\"git add\" vs \"git add -u\" recently.\n\nIn short, you cannot expect glob style pathspecs to work for an operation\nthat involves running diff internally.  You can guess that \"To be\ncommitted\" is computed by internally running \"diff --cached\".\n\nCurrently globbing style pathspec are supported as an added bonus to only\nsome commands (e.g. \"grep\", \"ls-files\", \"add\" but not \"add -u\").  You can\nalso guess that \"Untracked\" is computed by internally running \"ls-files\".\n\nIn the meantime, limit yourself to leading path style pathspecs.\n"},{"id":"135656","messageId":"201002250807.49470.chriscool@tuxfamily.org","threadId":"22811","inReplyTo":"ca433831002241928hef29dadu39f93bc1a8460331@mail.gmail.com","subject":"Re: [BUG] bugs in clean, status, bisect, and send-email","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-02-25T07:07:49Z","receivedAt":"2010-02-25T07:07:49Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thursday 25 February 2010 04:28:41 Mark Lodato wrote:\n> I noticed the following four bugs but don't have time to investigate\n> further, let alone make test cases or fix them.  If someone else wants\n> to tackle these, great.  If not, I'll try to research them more when I\n> get free time, which won't be for a while.\n\nThanks for the report!\n\n> 4. git-bisect fails if a pathspec is given that matches no commits\n> \n> It says there are -1 revisions left.  I have no idea what it does\n> after that.  The following example uses git.git.\n> \n> $ git bisect start v1.7.0 v1.6.6 -- 'foobar'\n> Bisecting: -1 revisions left to test after this (roughly 0 steps)\n> [f2a37151d4624906e34a9bcafb2ad79d0e8cb7ec] Fix memory leak in helper\n> method for disconnect\n\nI will have a look at this one, but I will be away until Monday, so don't \nexpect anything from me before.\n\nThanks,\nChristian.\n"}]}