{"thread":{"id":"13486","subject":"git-svn blame change- doc confusion","startedAt":"2008-05-12T04:05:49Z","lastAt":"2008-05-12T06:33:29Z","messageCount":2,"participants":["Dan McGee","Steven Grimm"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"76673","messageId":"449c10960805112105w2e362ea7l9b11c53c47952501@mail.gmail.com","threadId":"13486","inReplyTo":null,"subject":"git-svn blame change- doc confusion","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-05-12T04:05:49Z","receivedAt":"2008-05-12T04:05:49Z","isPatch":false,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"Here is the commit snippet. Reading the commit message, I would assume\nthe default format with no options is SVN, and you need to use the\n--git-format arg to get the GIT format.\n\nReading the new blame description seems to tell me the same thing.\n\nHowever, reading the --git-format description tells me something real\nweird- that using --git-format will give me SVN revision numbers and\nnot git hashes, and something about revision 0?\n\nCan someone clarify this for me and let me know if I'm the crazy one?\n\n-Dan\n\ncommit 4be403815321976bc2ee4c6677799abb06b153aa\nAuthor: Steven Grimm <koreth@midwinter.com>\nDate:   Sat May 10 22:11:18 2008 -0700\n\n    Add svn-compatible \"blame\" output format to git-svn\n\n    git-svn blame produced output in the format of git blame; in environments\n    where there are scripts that read the output of svn blame, it's useful\n    to be able to use them with the output of git-svn. The git-compatible\n    format is still available using the new \"--git-format\" option.\n\n    This also fixes a bug in the initial git-svn blame implementation; it was\n    bombing out on uncommitted local changes.\n\n    Signed-off-by: Steven Grimm <koreth@midwinter.com>\n    Acked-by: Eric Wong <normalperson@yhbt.net>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex f4ba105..c6b56b4 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -166,11 +166,18 @@ environment). This command has the same behaviour.\n Any other arguments are passed directly to `git log'\n\n 'blame'::\n-       Show what revision and author last modified each line of a file. This is\n-       identical to `git blame', but SVN revision numbers are shown\ninstead of git\n-       commit hashes.\n+       Show what revision and author last modified each line of a file. The\n+       output of this mode is format-compatible with the output of\n+       `svn blame' by default. Like the SVN blame command,\n+       local uncommitted changes in the working copy are ignored;\n+       the version of the file in the HEAD revision is annotated. Unknown\n+       arguments are passed directly to git-blame.\n +\n-All arguments are passed directly to `git blame'.\n+--git-format;;\n+       Produce output in the same format as `git blame', but with\n+       SVN revision numbers instead of git commit hashes. In this mode,\n+       changes that haven't been committed to SVN (including local\n+       working-copy edits) are shown as revision 0.\n\n --\n 'find-rev'::\n"},{"id":"76678","messageId":"906678E9-D203-484B-8416-1C6079C74B2D@midwinter.com","threadId":"13486","inReplyTo":"449c10960805112105w2e362ea7l9b11c53c47952501@mail.gmail.com","subject":"Re: git-svn blame change- doc confusion","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2008-05-12T06:33:29Z","receivedAt":"2008-05-12T06:33:29Z","isPatch":false,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"On May 11, 2008, at 9:05 PM, Dan McGee wrote:\n> Here is the commit snippet. Reading the commit message, I would assume\n> the default format with no options is SVN, and you need to use the\n> --git-format arg to get the GIT format.\n\nYes, that's right. But note that \"git format\" does not mean \"identical  \nto the output of git blame\" -- it means \"lines are formatted the same  \nway they are in git blame,\" meaning the revision ID (which in this  \ncase is an svn version number or 0 for any lines for which there isn't  \nhistory in svn) then the committer name and commit timestamp enclosed  \nin parentheses, then the line number with a trailing closing paren,  \nthen the contents of the line.\n\nThe svn format, by contrast, is the svn commit number, then the  \ncommitter name, then the contents of the line.\n\n> However, reading the --git-format description tells me something real\n> weird- that using --git-format will give me SVN revision numbers and\n> not git hashes, and something about revision 0?\n\nYes, that's also right. If you want git hashes, just run \"git blame\",  \nwhich will work exactly the same as in a non-svn-linked git repository  \n-- the whole point of having \"git svn blame\" is to view changes in  \nterms of svn revisions rather than git hashes.\n\n-Steve\n"}]}