New merge command#27
Conversation
|
Hi, that's no bad idea to have the ease of typing during a merge via Fish auto completion. |
joseluisq
left a comment
There was a problem hiding this comment.
Also I would like to see some updates on the README for this new command with some examples.
conf.d/gitnow.fish
Outdated
| end | ||
|
|
||
| set -l len (count $argv) | ||
| set -l opts . |
There was a problem hiding this comment.
Since the default argument looks like is a dot, a simple merge (git merge .) execution throws an error like fatal: . - not something we can merge.
If some argument is needed, I suggest to add some checks.
|
I added some checks (does the branch exist, is it not the already active one etc.). I also added the -a option (instead of the branch name) to abort a conflicted branch. Some examples:
|
It's good idea since you need at least one arg. |
|
If you look at my last commit, I already do use switch like you suggested |
|
Yes, you already do it. Sorry I had not seen it. BTW Check this bugfix for #28 which prevent an issue with the |
|
I plan to merge this in few minutes after a last review. |
track changes from original repository
|
When I try the merge --continue
# Local branch `` was not found. Not possible to merge.I think you need to iterate over the Lines 256 to 281 in 708a95a Which means you will need another check when a branch is not provided. Lines 283 to 289 in 708a95a |
|
Pushed a new commit which should satisfy your suggestions. |
|
I have tested and works fine! ~> merge --continue
Continue the current merge
fatal: There is no merge in progress (MERGE_HEAD missing).
~> merge
Merge: No argument given, needs one parameter
~> merge -a
Abort the current merge
fatal: There is no merge to abort (MERGE_HEAD missing).
~> git merge --help
~> merge --continue --no-verify
Continue the current merge
fatal: There is no merge in progress (MERGE_HEAD missing).
~> merge --no-verify --continue
Continue the current merge
fatal: There is no merge in progress (MERGE_HEAD missing).
~> merge --no-verify
Provide a valid branch name to switch to |
joseluisq
left a comment
There was a problem hiding this comment.
There is the last remaining change that should happen in order to merge this PR.
Hi,
i added a simple merge command which simply calls "git merge $argv".
I use git merge quite often and was frustrated that i always have to use "git merge" instead of just "merge".
This first entry right now is only like an alias basically. But the plan is that the functionality can be expanded later on (dry runs etc.). I did not come up with a keyboard shortcut (that makes sense) yet.
Greetings from Germany,
stay healthy everyone!