All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Levedahl <mlevedahl@gmail.com>
To: Wincent Colaiuta <win@wincent.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: bug? - git-checkout treeish paths  ignores deleted files
Date: Mon, 08 Oct 2007 23:39:29 -0400	[thread overview]
Message-ID: <470AF7F1.2010903@gmail.com> (raw)
In-Reply-To: <3B0685AB-0725-4473-8AE6-359F93851C10@wincent.com>

Wincent Colaiuta wrote:
> El 9/10/2007, a las 2:58, Mark Levedahl escribió:
>
>> Shouldn't   "git checkout topic path"  make the directory tree rooted 
>> at path identical to what is on branch topic? It doesn't.
>>
>>
>
> No, the behaviour is correct.
>
> - first you removed the file on the topic branch; at the same time you 
> removed it from your working tree
> - then you switched back to the master branch and so the file was 
> added back to your working tree
> - then you switched back to the topic branch, and seeing as the file 
> "a" is not being tracked in the topic branch Git doesn't touch it
>
> In general, Git only meddles with stuff that you've told it to track. 
> This is actually a good thing in most cases because it makes some 
> workflows involving dirty trees or trees with untracked content 
> somewhat more convenient.
>
> Cheers,
> Wincent
>
>
I'm not convinced...

"git checkout branch dir" should make dir have the same value it would 
get if I just did "git checkout branch".  The latter command will ignore 
files only if they are untracked in *both* HEAD and branch. I fail to 
see why the path-limited version of git-checkout should give a different 
result on the part it is asked to affect than the non-path limited 
version. This is very inconsistent and I'm having a hard time 
understanding what workflow it will help.

Mark

  reply	other threads:[~2007-10-09  3:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09  0:58 bug? - git-checkout treeish paths ignores deleted files Mark Levedahl
2007-10-09  1:52 ` Wincent Colaiuta
2007-10-09  3:39   ` Mark Levedahl [this message]
2007-10-09 10:20     ` Wincent Colaiuta

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=470AF7F1.2010903@gmail.com \
    --to=mlevedahl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=win@wincent.com \
    /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.