-
-
Notifications
You must be signed in to change notification settings - Fork 28
New merge command #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi, that's no bad idea to have the ease of typing during a merge via Fish auto completion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the last remaining change that should happen in order to merge this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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!