While moving '-m' to make room for CVS compatible "here is the
log message", enhance source of log parameters.
-m 'message': a command line parameter.
-F <file> : a file (use '-' to read from stdin).
-C <commit> : message in existing commit.
-c <commit> : message in existing commit (allows further editing).
Longer option names for these options are also available.
While we are at it, get rid of shell array bashism.
Signed-off-by: Junio C Hamano <junkio@cox.net>
If merging results in an unchanged tree, git-commit-script should not
complain that there's nothing to commit.
Also, add "[--all]" to usage().
[jc: usually there is no reason to record an unchanging merge,
but this code path is triggered only when there is a nontrivial
merge that needed to be resolved by hand, and we should be able
to record the fact that these two tree heads are dealt with as a
regular two-parent commit in order to help later merges.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
This patch changes rev-parse users that pass a single argument
that is supposed to be a rev parameter to use "--verify".
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
It sets up the normal git environment variables and a few helper
functions (currently just "die()"), and returns ok if it all looks like
a git archive. So use it something like
. git-sh-setup-script || die "Not a git archive"
to make the rest of the git scripts more careful and readable.
With -m flag specified, git-commit-script takes the commit
message along with author information from an existing commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
It does a "git-update-cache" on the arguments, meaning that you can
commit files without doing a separate "git-update-cache". This commit
was done with
git commit git-commit-script
for example.
Should be obvious...
- Use $VISUAL, $EDITOR, in this order if set, and fall back on
vi.
- Status R, C, D, N usually are followed by number, so adjust
case arms to that pattern.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This is meant to make raw git not hugely less usable than something
like raw CVS. I want to make a 1.0 release of the plumbing, and the
actual commit part was just too intimidating.