Re: [PATCH 1/2] Teach git-reset to let others override its reflog entry.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Shawn O. Pearce" <spearce@xxxxxxxxxxx> 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?

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]