While using git over the past few weeks a couple of questions have arisen.
1 - When doing a 'git commit' where does one, by convention, put the comment? Does it go before all the comments, after them, or what? I know it doesn't actually matter at all but I'd still like to know.
2 - What is 'git diff' invoking as a pager, and why? E.g. see the following:-
chris$ git diff mychanges stable diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class index 5075c60..01f15a5 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -774,8 +774,8 @@ if (!class_exists('setting_dirchoice')) { if ($entry == '.' || $entry == '..') continue; if ($this->_pattern && !preg_match($this->_pattern,$entry)) continue;
- $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $this->_dir.$fil - if (is_dir($file)) $list[] = $entry; + $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $entry; + if (is_dir($this->_dir.$file)) $list[] = $entry; } closedir($dh); } (END)
That (END) is a prompt waiting for me to do something to exit. This is on a 60 line high terminal window so the pager is unnecessary anyway! The real problem was that it took me quite a while to find out how to exit.