git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: "Randal L. Schwartz" <merlyn@stonehenge.com>
Cc: Bill Lear <rael@zopyra.com>, git@vger.kernel.org
Subject: Re: pull into dirty working tree
Date: Wed, 13 Jun 2007 23:39:31 +0200	[thread overview]
Message-ID: <20070613213931.GD3412@steel.home> (raw)
In-Reply-To: <86odjjziek.fsf@blue.stonehenge.com>

Randal L. Schwartz, Wed, Jun 13, 2007 22:52:35 +0200:
> Alex> No, it wont. What files are you going to add?
> 
> Whatever you are working on.  Whatever you want tracked.  It's a commit.
> I'm not sure why you're having trouble following me.  What did I leave out?

You left the process of figuring out what files should be temporarily
added to the index. _Automatically_. Because that's what you need if
you want "git pull" to just work. Otherwise it just fails.

> >> git-rebase *will* do the merge.  It must. :)
> Alex> It won't merge anything which isn't known to git.
> 
> And that's irrelevant, because my first step *did* a commit so they are
> *known* to git.

It is not enough. It didn't add the "other" files to index, so the
files are _not_ known to git.

Imagine you added a file to Makefile (which was known to git), wrote
the file, put some code in it, played with it. Never called "git add"
on it yet (you were just playing, as original poster suggested).
Now someone from team calls and asks you to tests his changes (and
imagine he added a file with exactly the same name as yours). You do a
pull from his repo and it breaks. With your method it will break too,
"git commit -a" wont add your file to index.

> Alex>  Now, I come to think
> Alex> about it, no existing merge method will help you here (and very likely
> Alex> it shouldn't).
> 
> Yes, it should.  You're merging your changes onto the upstream.  This
> happens dozens of times a day with git repos all over the world. :)

Other way around. You merge upstream in your branch. And it conflicts
with work you haven't told git about just yet.

> Alex> It is actually much simplier doing things right: all this stashing
> Alex> people keep talking about.
> 
> Yes, and that's what I said too.
> 

You (and others) just keep forgetting about this small detail with
"other" files. Junio noticed it too. This "small" detail can make the
whole stashing bussiness impossible except for maybe a common case.
Which is not very helpful for a newbie who meets the uncommon, but his
case. He'll learn his way though, of course. After saying out loud:
"git sucks!"; which what they already do.

  reply	other threads:[~2007-06-13 21:39 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13 14:14 pull into dirty working tree Bill Lear
2007-06-13 14:38 ` Pierre Habouzit
2007-06-13 14:43   ` Pierre Habouzit
2007-06-13 14:47     ` Pierre Habouzit
2007-06-13 14:45   ` Bill Lear
2007-06-13 14:53     ` Pierre Habouzit
2007-06-13 15:01 ` Randal L. Schwartz
2007-06-13 19:28   ` Alex Riesen
2007-06-13 19:32     ` Randal L. Schwartz
2007-06-13 20:47       ` Alex Riesen
2007-06-13 20:52         ` Randal L. Schwartz
2007-06-13 21:39           ` Alex Riesen [this message]
2007-06-13 22:01             ` Randal L. Schwartz
2007-06-13 22:27               ` Alex Riesen
2007-06-13 15:01 ` Johannes Schindelin
2007-06-13 15:40   ` Andy Parkins
2007-06-13 15:54     ` Johannes Schindelin
2007-06-13 15:56     ` Bill Lear
2007-06-13 16:07       ` Johannes Schindelin
2007-06-13 16:30         ` Bill Lear
2007-06-13 17:13   ` Junio C Hamano
2007-06-14  4:22 ` Daniel Barkalow
2007-06-14  5:21 ` Linus Torvalds
2007-06-14  7:49   ` Junio C Hamano
2007-06-14  8:01     ` Raimund Bauer
2007-06-14  8:06     ` Steven Grimm
2007-06-14 14:25       ` Nicolas Pitre
2007-06-14 12:46   ` Bill Lear
2007-06-14 15:46     ` Linus Torvalds
2007-06-14 20:20       ` Olivier Galibert
2007-06-14 20:30         ` Linus Torvalds
2007-06-15  0:46       ` Martin Langhoff
2007-06-15  1:07         ` Linus Torvalds
2007-06-15  3:33           ` Martin Langhoff
2007-06-15 18:26             ` Robin Rosenberg
  -- strict thread matches above, loose matches on Subject: below --
2007-06-13 15:03 MichaelTiloDressel
2007-06-13 15:36 ` Bill Lear
2007-06-13 17:31   ` Michael Dressel
2007-06-13 18:12     ` Bill Lear
2007-06-13 18:30       ` Johannes Schindelin
2007-06-13 18:56         ` Bill Lear
2007-06-13 20:17           ` Robin Rosenberg
2007-06-13 23:32             ` Johannes Schindelin

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=20070613213931.GD3412@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=merlyn@stonehenge.com \
    --cc=rael@zopyra.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 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).