Re: [RFC] Delete current branch

2013-07-19 Thread Ramkumar Ramachandra
Andreas Schwab wrote: Ramkumar Ramachandra artag...@gmail.com writes: # er, what was the branch name again? $ git checkout - You could take a look in the reflog. Yeah, or use the @{-N} revision to do that for me. My scripted version is essentially: test true = $(git rev-parse

Re: [RFC] Delete current branch

2013-07-19 Thread Andreas Schwab
Ramkumar Ramachandra artag...@gmail.com writes: # er, what was the branch name again? $ git checkout - You could take a look in the reflog. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something

Re: [RFC] Delete current branch

2013-07-19 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Many of my ideas turn out to be really stupid, and I need to throw away my feature branch. So, I find myself doing this often: # on branch menuconfig-jk $ git checkout master $ git branch -DBACKSAPCE # er, what was the branch name

Re: [RFC] Delete current branch

2013-07-19 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Did you know that the general way to spell the branch previously you were on is @{-1} and checkout - is an ugly special case that is possible only because checkout does not happen to take a - as a valid argument that means something else (like the more usual read from

Re: [RFC] Delete current branch

2013-07-19 Thread Taylor Hedberg
Junio C Hamano, Fri 2013-07-19 @ 09:48:06-0700: But there is a very commonly accepted long tradition for - to mean read from the standard input, so we cannot reuse it to mean the branch I was previously on for every command without first making sure the command will never want to use - for the

Re: [RFC] Delete current branch

2013-07-19 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Did you know that the general way to spell the branch previously you were on is @{-1} and checkout - is an ugly special case that is possible only because checkout does not happen to take a - as a valid argument that means

Re: [RFC] Delete current branch

2013-07-19 Thread Ramkumar Ramachandra
Junio C Hamano wrote: That limits the context we could use - and we cannot consistently use it everywhere. I find _that_ ugly from the design cleanliness point of view. Right, noted. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [RFC] Delete current branch

2013-07-19 Thread Junio C Hamano
Taylor Hedberg tmhedb...@gmail.com writes: Junio C Hamano, Fri 2013-07-19 @ 09:48:06-0700: But there is a very commonly accepted long tradition for - to mean read from the standard input, so we cannot reuse it to mean the branch I was previously on for every command without first making sure

Re: [RFC] Delete current branch

2013-07-19 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Did you know that the general way to spell the branch previously you were on is @{-1} and checkout - is an ugly special case that is possible only because checkout does not happen