{"thread":{"id":"25612","subject":"which git commands is correponding to \"svnlook diff -t\" and \"svnlook log -t\"?","startedAt":"2010-11-02T07:03:31Z","lastAt":"2010-11-11T08:47:23Z","messageCount":4,"participants":["samilkarahan","Matthieu Moy","Mathias Lafeldt","Jan Hudec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"154953","messageId":"30111518.post@talk.nabble.com","threadId":"25612","inReplyTo":null,"subject":"which git commands is correponding to \"svnlook diff -t\" and \"svnlook log -t\"?","fromName":"samilkarahan","fromEmail":"samilkarahan@yahoo.com","sentAt":"2010-11-02T07:03:31Z","receivedAt":"2010-11-02T07:03:31Z","isPatch":false,"sender":{"key":"samilkarahan@yahoo.com","avatar":null},"body":"\nHi,\n\nI have developed pre-commit hook, but it only run for svn hook. \n\nI want to run it for git hook,But I don't know git well like svn ,so \n\nI haven't found corresponding git command to svn commands which are \"svnlook\ndiff -t\" and \"svnlook log -t\".\n\nthese commands take two parameter in svn. But ı don't know how many\nparamater git command takes.\n\nis there anybody know these git commands??\n\nthanks for your helps.\n\nbest regards...\n\n\n-- \nView this message in context: http://old.nabble.com/which-git-commands-is--correponding-to-%22svnlook-diff--t%22-and-%22svnlook-log--t%22--tp30111518p30111518.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"154960","messageId":"vpq8w1cxfkk.fsf@bauges.imag.fr","threadId":"25612","inReplyTo":"30111518.post@talk.nabble.com","subject":"Re: which git commands is correponding to \"svnlook diff -t\" and \"svnlook log -t\"?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-11-02T09:03:39Z","receivedAt":"2010-11-02T09:03:39Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"samilkarahan <samilkarahan@yahoo.com> writes:\n\n> Hi,\n>\n> I have developed pre-commit hook, but it only run for svn hook. \n>\n> I want to run it for git hook,But I don't know git well like svn ,so \n>\n> I haven't found corresponding git command to svn commands which are \"svnlook\n> diff -t\" and \"svnlook log -t\".\n>\n> these commands take two parameter in svn.\n\nWhat do these commands do in SVN?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"154961","messageId":"4CCFD640.6070909@debugon.org","threadId":"25612","inReplyTo":"vpq8w1cxfkk.fsf@bauges.imag.fr","subject":"Re: which git commands is correponding to \"svnlook diff -t\" and \"svnlook log -t\"?","fromName":"Mathias Lafeldt","fromEmail":"misfire@debugon.org","sentAt":"2010-11-02T09:13:36Z","receivedAt":"2010-11-02T09:13:36Z","isPatch":false,"sender":{"key":"misfire@debugon.org","avatar":"https://avatars.githubusercontent.com/u/158074?v=4"},"body":"Matthieu Moy wrote:\n> samilkarahan <samilkarahan@yahoo.com> writes:\n> \n>> Hi,\n>>\n>> I have developed pre-commit hook, but it only run for svn hook. \n>>\n>> I want to run it for git hook,But I don't know git well like svn ,so \n>>\n>> I haven't found corresponding git command to svn commands which are \"svnlook\n>> diff -t\" and \"svnlook log -t\".\n>>\n>> these commands take two parameter in svn.\n> \n> What do these commands do in SVN?\n> \n\n$ svnlook help diff\ndiff: usage: svnlook diff REPOS_PATH\n\nPrint GNU-style diffs of changed files and properties.\n\nValid options:\n  -r [--revision] ARG      : specify revision number ARG\n  -t [--transaction] ARG   : specify transaction name ARG\n  --no-diff-deleted        : do not print differences for deleted files\n  --no-diff-added          : do not print differences for added files\n  --diff-copy-from         : print differences against the copy source\n  -x [--extensions] ARG    : Default: '-u'. When Subversion is invoking an\n                             external diff program, ARG is simply passed\nalong\n                             to the program. But when Subversion is\nusing its\n                             default internal diff implementation, or when\n                             Subversion is displaying blame annotations, ARG\n                             could be any of the following:\n                                -u (--unified):\n                                   Output 3 lines of unified context.\n                                -b (--ignore-space-change):\n                                   Ignore changes in the amount of white\nspace.\n                                -w (--ignore-all-space):\n                                   Ignore all white space.\n                                --ignore-eol-style:\n                                   Ignore changes in EOL style\n\n$ svnlook help log\nlog: usage: svnlook log REPOS_PATH\n\nPrint the log message.\n\nValid options:\n  -r [--revision] ARG      : specify revision number ARG\n  -t [--transaction] ARG   : specify transaction name ARG\n\n\nThough I have no idea what \"transaction\" means here?\n\nApart from that, I guess \"svnlook log\" corresponds to \"git log\" and\n\"svnlook diff\" to \"git log -p\".\n\n-Mathias\n"},{"id":"155657","messageId":"20101111084723.GD30870@efreet.light.src","threadId":"25612","inReplyTo":"30111518.post@talk.nabble.com","subject":"Re: which git commands is correponding to \"svnlook diff -t\" and \"svnlook log -t\"?","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2010-11-11T08:47:23Z","receivedAt":"2010-11-11T08:47:23Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Tue, Nov 02, 2010 at 00:03:31 -0700, samilkarahan wrote:\n> I have developed pre-commit hook, but it only run for svn hook. \n> \n> I want to run it for git hook,But I don't know git well like svn ,so \n\nGit works fundamentally differently from subversion. It's not possible to\ngive you good advice unless you explain what you want to do in the hook.\n\nWhere subversion has one commit operation to create the changeset and publish\nit, git has two operations. Commit to create it and push to publish it. Each\ncomes with it's own set of hooks. Moreover the operations are done on\ndifferent repositories, so they run hooks from different places!\n\nCommit has 'pre-commit', 'prepare-commit-msg', 'commit-msg' and 'post-commit'\nrun on the developers local repositories, where they must be manually\ninstalled and can be easily disabled (with --no-verify option to commit).\nThe prepare-commit-msg gives you some extra flexibility in that you can\nprepare template of the commit message here.\n\nPush has 'pre-receive', 'update', 'post-receive' and 'post-update' run on the\ncentral repository and there is no way around them. It is, however, kind of\nlate. The commits are already done, perhaps even for quite a long time, so if\nthey are rejected, developers will have to go back and amend them.\n\nRemember, that multiple commits will be pushed at once, so you have to\ninspect all of them (git log $oldsha..$newsha), not just the latest.\n\n> I haven't found corresponding git command to svn commands which are \"svnlook\n> diff -t\"\n\nDepends on which git hook you want that in. And that depends on what you want\nto do. For pre-commit hook, it's 'git diff --cached', for pre-receive or\nupdate hook you get the commit ID and inspect it with 'git log' and 'git\nshow'.\n\n> and \"svnlook log -t\".\n\nAgain, depends on which git hook you want that in. And that depends on what\nyou want to do. For pre-commit hook there is none, since it's called\n*before* the message is created. For commit-msg hook you get name of file\nwith the message as argument (and you can edit it from there). For\npre-receive hook or update hook you use 'git log' and 'git show' again.\n\n> is there anybody know these git commands??\n\nEverybody knows them plus they are quite obvious from the documentation (man\ngit-hooks) and the samples (installed by 'git init' in every repository). But\nnobody knows the subversion commands and there is no simple mapping anyway.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"}]}