From: David Madore <david+news@madore.org>
To: git@vger.kernel.org
Subject: suggestion for a simple addition: git update-ref --ff-only
Date: Sat, 2 Mar 2013 00:18:59 +0100 [thread overview]
Message-ID: <20130301231859.GA334@achernar.madore.org> (raw)
Hi list,
I'd like to suggest a very simple, but IMHO quite useful, additional
option to git-update-ref: an option --ff-only which would cause the
command to refuse unless the current ref is an ancestor of the new
one.
The reason I think it would be useful: I occasionally wish to perform
a trivial (i.e., fast-forward) merge of some branch into another
(e.g., after a git-fetch) without checking it out. Now git-update-ref
is perfect for that, but there is always the possibility of getting
something wrong (which one would not have with git merge --ff-only,
but the latter requires checking out the branch), and this option
would avoid tedious verifications.
Happy hacking,
--
David A. Madore
( http://www.madore.org/~david/ )
next reply other threads:[~2013-03-01 23:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-01 23:18 David Madore [this message]
2013-03-01 23:33 ` suggestion for a simple addition: git update-ref --ff-only Junio C Hamano
2013-03-02 1:10 ` Jeff King
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=20130301231859.GA334@achernar.madore.org \
--to=david+news@madore.org \
--cc=git@vger.kernel.org \
/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).