mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
crap -C is different
This commit is contained in:
parent
89b7e97e1d
commit
96b8356475
3 changed files with 1 additions and 15 deletions
|
@ -282,8 +282,7 @@ OptionParser.prototype.getMasterOptionMap = function() {
|
|||
'--amend': false,
|
||||
'-a': false, // warning
|
||||
'-am': false, // warning
|
||||
'-m': false,
|
||||
'-C': false
|
||||
'-m': false
|
||||
},
|
||||
status: {},
|
||||
log: {},
|
||||
|
|
12
src/git.js
12
src/git.js
|
@ -535,19 +535,7 @@ GitEngine.prototype.commit = function() {
|
|||
// if we want to ammend, go one above
|
||||
if (this.commandOptions['--amend']) {
|
||||
targetCommit = this.resolveID('HEAD~1');
|
||||
// if they specify -C, go there
|
||||
if (this.commandOptions['-C']) {
|
||||
this.validateArgBounds(this.commandOptions['-C'], 1, 1, '-C');
|
||||
targetCommit = this.numBackFrom(this.getCommitFromRef(this.commandOptions['-C'][0]), 1);
|
||||
}
|
||||
|
||||
id = this.rebaseAltID(this.getCommitFromRef('HEAD').get('id'));
|
||||
} else {
|
||||
if (this.commandOptions['-C']) {
|
||||
throw new GitError({
|
||||
msg: 'I only support -C when doing --amend, sorry'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var newCommit = this.makeCommit([targetCommit], id);
|
||||
|
|
1
todo.txt
1
todo.txt
|
@ -35,7 +35,6 @@ Pre-publish things:
|
|||
extra command ideas:
|
||||
|
||||
git log branchA ^branchB
|
||||
git commit --amend -C HEAD
|
||||
|
||||
2013 Things
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue