checkout @{-1} bug/oddity

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

checkout @{-1} bug/oddity

From: Adeodato Simó <hidden>
Date: 2016-06-15 22:46:37

In case this is worth fixing:

  | % g co -b foo
  | Switched to a new branch 'foo'
  | 
  | % g co -
  | Switched to branch 'master'
  | 
  | % g co -b bar
  | Switched to a new branch 'bar'
  | 
  | % g co bar
  | Already on 'bar'
  | 
  | % g co -
  | Already on 'bar'

In my opinion the last command should switch to master, as in, switching
to the current branch should not lose the @{-1} history.

Thanks,

-- 
- Are you sure we're good?
- Always.
        -- Rory and Lorelai

Re: checkout @{-1} bug/oddity

From: Thomas Rast <hidden>
Date: 2016-06-15 22:46:37

Adeodato Simó wrote:
  | % g co bar
  | Already on 'bar'
  | 
  | % g co -
  | Already on 'bar'

In my opinion the last command should switch to master, as in, switching
to the current branch should not lose the @{-1} history.
This is by analogy with 'cd'.  Try 'cd .; cd -' in the shell.

See

  http://article.gmane.org/gmane.comp.version-control.git/106583

for the original mention; I don't have the time to re-read the entire
thread, but IIRC it was not discussed again.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Re: checkout @{-1} bug/oddity

From: Adeodato Simó <hidden>
Date: 2016-06-15 22:46:37

+ Thomas Rast (Sun, 19 Apr 2009 22:36:29 +0200):
This is by analogy with 'cd'.  Try 'cd .; cd -' in the shell.
See
  http://article.gmane.org/gmane.comp.version-control.git/106583
for the original mention; I don't have the time to re-read the entire
thread, but IIRC it was not discussed again.
Ok!, thanks for the explanations.

-- 
- Are you sure we're good?
- Always.
        -- Rory and Lorelai
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help