From: Junio C Hamano <junkio@cox.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] Teach git-reset to let others override its reflog entry.
Date: Wed, 27 Dec 2006 22:13:58 -0800 [thread overview]
Message-ID: <7vslf0zgwp.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20061228014336.GA16790@spearce.org> (Shawn O. Pearce's message of "Wed, 27 Dec 2006 20:43:36 -0500")
"Shawn O. Pearce" <spearce@spearce.org> writes:
> The new --reflog-action for git-reset behaves like the same option
> to git-merge; it can be used by the caller to override the message
> entry in the reflog and is intended to be used only when git-reset
> is acting as plumbing, not porcelain.
Honestly, I hate these --reflog-action options everywhere.
I wonder if something like this would be easier to manage in the
longer run:
* In git-sh-setup.sh, have this shell function.
set_reflog_action () {
if test -z "${GIT_REFLOG_ACTION+set}"
then
GIT_REFLOG_ACTION="$*"
export GIT_REFLOG_ACTION
fi
}
* Begin git-reset.sh with something like this:
#!/bin/sh
. git-sh-setup
set_reflog_action "reset $*"
* Update Porcelain-ish commands that use git-reset in the same
way. For example, git-rebase could say:
#!/bin/sh
. git-sh-setup
set_reflog_action "rebase $*"
Then calls to "git-update-ref -m" could use the value of
"$GIT_REFLOG_ACTION", without explicit --reflog-action=
parameters and $rloga variables.
Hmm?
next prev parent reply other threads:[~2006-12-28 6:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-28 1:43 [PATCH 1/2] Teach git-reset to let others override its reflog entry Shawn O. Pearce
2006-12-28 6:13 ` Junio C Hamano [this message]
2006-12-28 6:22 ` Shawn Pearce
2006-12-28 11:52 ` Jakub Narebski
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=7vslf0zgwp.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.