From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Cc: Jonathan Nieder <jrnieder@gmail.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH] merge: default to @{upstream}
Date: Fri, 28 Jan 2011 18:17:37 +0200 [thread overview]
Message-ID: <1296231457-18780-1-git-send-email-felipe.contreras@gmail.com> (raw)
So 'git merge' is 'git merge @{upstream}' instead of 'git merge -h';
it's better to do something useful.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
builtin/merge.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index 42fff38..f23d669 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -983,9 +983,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
if (!allow_fast_forward && fast_forward_only)
die("You cannot combine --no-ff with --ff-only.");
- if (!argc)
- usage_with_options(builtin_merge_usage,
- builtin_merge_options);
+ if (!argc) {
+ /* argv[argc] should be NULL, so we can hijack it */
+ argv[0] = "@{u}";
+ argc = 1;
+ }
/*
* This could be traditional "merge <msg> HEAD <commit>..." and
--
1.7.4.rc3
next reply other threads:[~2011-01-28 16:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 16:17 Felipe Contreras [this message]
2011-01-28 16:44 ` [PATCH] merge: default to @{upstream} Drew Northup
2011-01-28 17:53 ` Felipe Contreras
2011-01-28 17:56 ` Jonathan Nieder
2011-01-28 18:46 ` Felipe Contreras
2011-01-30 21:51 ` Jonathan Nieder
2011-01-28 19:53 ` Bert Wesarg
2011-01-28 21:41 ` Martin von Zweigbergk
2011-01-31 1:55 ` Miles Bader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296231457-18780-1-git-send-email-felipe.contreras@gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).