* which git commands is correponding to "svnlook diff -t" and "svnlook log -t"? @ 2010-11-02 7:03 samilkarahan 2010-11-02 9:03 ` Matthieu Moy 2010-11-11 8:47 ` Jan Hudec 0 siblings, 2 replies; 4+ messages in thread From: samilkarahan @ 2010-11-02 7:03 UTC (permalink / raw) To: git Hi, I have developed pre-commit hook, but it only run for svn hook. I want to run it for git hook,But I don't know git well like svn ,so I haven't found corresponding git command to svn commands which are "svnlook diff -t" and "svnlook log -t". these commands take two parameter in svn. But ı don't know how many paramater git command takes. is there anybody know these git commands?? thanks for your helps. best regards... -- View 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 Sent from the git mailing list archive at Nabble.com. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: which git commands is correponding to "svnlook diff -t" and "svnlook log -t"? 2010-11-02 7:03 which git commands is correponding to "svnlook diff -t" and "svnlook log -t"? samilkarahan @ 2010-11-02 9:03 ` Matthieu Moy 2010-11-02 9:13 ` Mathias Lafeldt 2010-11-11 8:47 ` Jan Hudec 1 sibling, 1 reply; 4+ messages in thread From: Matthieu Moy @ 2010-11-02 9:03 UTC (permalink / raw) To: samilkarahan; +Cc: git samilkarahan <samilkarahan@yahoo.com> writes: > Hi, > > I have developed pre-commit hook, but it only run for svn hook. > > I want to run it for git hook,But I don't know git well like svn ,so > > I haven't found corresponding git command to svn commands which are "svnlook > diff -t" and "svnlook log -t". > > these commands take two parameter in svn. What do these commands do in SVN? -- Matthieu Moy http://www-verimag.imag.fr/~moy/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: which git commands is correponding to "svnlook diff -t" and "svnlook log -t"? 2010-11-02 9:03 ` Matthieu Moy @ 2010-11-02 9:13 ` Mathias Lafeldt 0 siblings, 0 replies; 4+ messages in thread From: Mathias Lafeldt @ 2010-11-02 9:13 UTC (permalink / raw) To: Matthieu Moy; +Cc: samilkarahan, git Matthieu Moy wrote: > samilkarahan <samilkarahan@yahoo.com> writes: > >> Hi, >> >> I have developed pre-commit hook, but it only run for svn hook. >> >> I want to run it for git hook,But I don't know git well like svn ,so >> >> I haven't found corresponding git command to svn commands which are "svnlook >> diff -t" and "svnlook log -t". >> >> these commands take two parameter in svn. > > What do these commands do in SVN? > $ svnlook help diff diff: usage: svnlook diff REPOS_PATH Print GNU-style diffs of changed files and properties. Valid options: -r [--revision] ARG : specify revision number ARG -t [--transaction] ARG : specify transaction name ARG --no-diff-deleted : do not print differences for deleted files --no-diff-added : do not print differences for added files --diff-copy-from : print differences against the copy source -x [--extensions] ARG : Default: '-u'. When Subversion is invoking an external diff program, ARG is simply passed along to the program. But when Subversion is using its default internal diff implementation, or when Subversion is displaying blame annotations, ARG could be any of the following: -u (--unified): Output 3 lines of unified context. -b (--ignore-space-change): Ignore changes in the amount of white space. -w (--ignore-all-space): Ignore all white space. --ignore-eol-style: Ignore changes in EOL style $ svnlook help log log: usage: svnlook log REPOS_PATH Print the log message. Valid options: -r [--revision] ARG : specify revision number ARG -t [--transaction] ARG : specify transaction name ARG Though I have no idea what "transaction" means here? Apart from that, I guess "svnlook log" corresponds to "git log" and "svnlook diff" to "git log -p". -Mathias ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: which git commands is correponding to "svnlook diff -t" and "svnlook log -t"? 2010-11-02 7:03 which git commands is correponding to "svnlook diff -t" and "svnlook log -t"? samilkarahan 2010-11-02 9:03 ` Matthieu Moy @ 2010-11-11 8:47 ` Jan Hudec 1 sibling, 0 replies; 4+ messages in thread From: Jan Hudec @ 2010-11-11 8:47 UTC (permalink / raw) To: samilkarahan; +Cc: git On Tue, Nov 02, 2010 at 00:03:31 -0700, samilkarahan wrote: > I have developed pre-commit hook, but it only run for svn hook. > > I want to run it for git hook,But I don't know git well like svn ,so Git works fundamentally differently from subversion. It's not possible to give you good advice unless you explain what you want to do in the hook. Where subversion has one commit operation to create the changeset and publish it, git has two operations. Commit to create it and push to publish it. Each comes with it's own set of hooks. Moreover the operations are done on different repositories, so they run hooks from different places! Commit has 'pre-commit', 'prepare-commit-msg', 'commit-msg' and 'post-commit' run on the developers local repositories, where they must be manually installed and can be easily disabled (with --no-verify option to commit). The prepare-commit-msg gives you some extra flexibility in that you can prepare template of the commit message here. Push has 'pre-receive', 'update', 'post-receive' and 'post-update' run on the central repository and there is no way around them. It is, however, kind of late. The commits are already done, perhaps even for quite a long time, so if they are rejected, developers will have to go back and amend them. Remember, that multiple commits will be pushed at once, so you have to inspect all of them (git log $oldsha..$newsha), not just the latest. > I haven't found corresponding git command to svn commands which are "svnlook > diff -t" Depends on which git hook you want that in. And that depends on what you want to do. For pre-commit hook, it's 'git diff --cached', for pre-receive or update hook you get the commit ID and inspect it with 'git log' and 'git show'. > and "svnlook log -t". Again, depends on which git hook you want that in. And that depends on what you want to do. For pre-commit hook there is none, since it's called *before* the message is created. For commit-msg hook you get name of file with the message as argument (and you can edit it from there). For pre-receive hook or update hook you use 'git log' and 'git show' again. > is there anybody know these git commands?? Everybody knows them plus they are quite obvious from the documentation (man git-hooks) and the samples (installed by 'git init' in every repository). But nobody knows the subversion commands and there is no simple mapping anyway. -- Jan 'Bulb' Hudec <bulb@ucw.cz> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-11 8:47 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-11-02 7:03 which git commands is correponding to "svnlook diff -t" and "svnlook log -t"? samilkarahan 2010-11-02 9:03 ` Matthieu Moy 2010-11-02 9:13 ` Mathias Lafeldt 2010-11-11 8:47 ` Jan Hudec
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).