git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: cache status after git pull
@ 2005-08-25 20:46 Luck, Tony
  2005-08-26  1:29 ` [PATCH] Fix pulling into the same branch Junio C Hamano
  2005-08-26  1:29 ` cache status after git pull Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Luck, Tony @ 2005-08-25 20:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

>To set up "linus" short-hand to be updated with "master" branch
>head from Linus, you would do one of the following:
>
>  * Using new style shorthand
>
>    $ cat >$GIT_DIR/remotes/linus \
>    URL: http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
>    Pull: master:linus
>    $ git fetch linus

This sounds like it does what I want ... so I'd like to confirm
before wiring this into my scripts and fingers.

What I want is to get the latest from kernel.org...linus...master
and update my .refs/heads/linus with the new SHA1.

I'd like to be able to do that without touching what is in my
index, and without changing the state of any checked out files.

If that is what the above does, then you are my hero for today :-)

-Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread
* cache status after git pull
@ 2005-08-25 16:08 tony.luck
  2005-08-25 20:26 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: tony.luck @ 2005-08-25 16:08 UTC (permalink / raw)
  To: git

>* When the branch head pointed by $GIT_DIR/HEAD changes while
> the index file and working tree are looking the other way
> (e.g. somebody pushed into your repository, or you ran "git
> fetch" to update the ref your working tree is on), "git
> checkout" without -f gets confused.  Figure out a good way to
> handle this.

Aha ... is this the problem that caught me out last week (when
I ended up with 10 extra files attached to one of my commits)? At
the time the blame was placed on a failed merge not being backed
out correctly.  But I only had the failed merge because "get checkout"
had failed to switch branches (and not provided an exit code to
stop my script from trying the merge).

Here's what I did this morning.

1) Updated my "linus" branch:

  $ git checkout linus && git pull linus

This appeared to work just fine ... except that when I
check the status of my tree I see:

  $ git status
  #
  # Updated but not checked in:
  #   (will commit)
  #
  #       modified: arch/ia64/pci/pci.c
  #       modified: arch/ppc64/kernel/setup.c
  #       modified: arch/sparc64/kernel/pci.c
  #       modified: arch/x86_64/defconfig
  #       modified: drivers/block/cfq-iosched.c
  #       modified: include/asm-m68k/page.h
  #       modified: kernel/cpuset.c
  #
  #
  # On branch refs/heads/linus
  
Which looks like a set of landmines just waiting for me to
step on them!

Today these didn't bite me.  "git checkout release" worked
and switched to my release branch (and git status went back
to saying "nothing to commit").  But in the past I think
this is the situation that has caused "git checkout" to fail
with the "fatal: Entry 'blah' would be overwritten by merge. Cannot merge."

-Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-08-26 18:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-25 20:46 cache status after git pull Luck, Tony
2005-08-26  1:29 ` [PATCH] Fix pulling into the same branch Junio C Hamano
2005-08-26 13:04   ` Johannes Schindelin
2005-08-26 18:03     ` Junio C Hamano
2005-08-26  1:29 ` cache status after git pull Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2005-08-25 16:08 tony.luck
2005-08-25 20:26 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).