Re: Proposal: "unadd" command / alias.

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

 



On Wed, Oct 28, 2020 at 01:02:11AM +0300, Filipp Bakanov wrote:
> >> Indeed, I have a similar alias in my ~/.gitconfig
> 
> Why not just add it to git by default for everybody? revert-file is
> also ok, anything except `checkout HEAD --` will be good.

Because everyone may have their own favorite aliases?  Just because
*I* have the following aliases doesn't mean that everyone else would
find them useful.

[alias]
	new = !gitk --all --not ORIG_HEAD
	dw = diff --stat --summary
	di = diff --stat --summary --cached
	dc = describe --contains
	revert-file = checkout HEAD --
	l  = log --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
	lr = log --reverse --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
	rl  = log -g --pretty=format:'%Cred%h%Creset %gd %gs %Cgreen(%gr)%Creset %s' --abbrev-commit
	rl1  = log -g --date=relative --pretty=format:'%Cred%h%Creset %gs %Cgreen%gd%Creset %s' --abbrev-commit
	lg  = log --graph --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
	lgt = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
	rlt = log -g --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit
	lgt-nc = log --graph --pretty=format:'%h -%d %s (%cr)' --abbrev-commit
	st = status -s
	recent = for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)'
	gerrit-clone = !bash ggh gerrit-clone
	start = !bash ggh start
	upload = !bash ggh upload
	prune-branches = !bash ggh prune-branches
	fixes = log -1 --pretty=fixes

I have a huge number of bash aliases, and that doesn't mean everyone
else should have those bash aliases.  For that matter, I have the
following in ~/bin/git-rp-ext4 so that I can type "git rp-ext4
tags/ext4_for_linus".  But that doesn't mean this script is right for
everyone....

Cheers,

					- Ted

#!/bin/sh

START=origin
URL=git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
END=""

print_help ()
{
    PROG=$(basename "$0")
    echo "Usage: $PROG [-n] [--start <START COMMIT>] [--url <URL] [<END COMMIT>]"
    exit 1
}

while [ "$1" != "" ]; do
    case $1 in
	--start) shift
		 START="$1"
		 ;;
	--url) shift
	       URL="$1"
	       ;;
	-n) NO_ACTION="echo" ;;
	-*) print_help ;;
	*)
	    if test -n "$END"
	    then
		print_help
	    else
		END="$1"
	    fi
	    ;;
    esac
    shift
done

$NO_ACTION git request-pull "$START" "$URL" "$END"




[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]

  Powered by Linux