git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: cg-update with local uncommitted changes

From
Petr Baudis <pasky@ucw.cz>
Date
Jun 5, 2005, 20:58 UTC
Message-ID
<20050605205811.GS17462@pasky.ji.cz>
In-Reply-To
<1117747614.3656.2.camel@pegasus>

Dear diary, on Thu, Jun 02, 2005 at 11:26:54PM CEST, I got a letter where Marcel Holtmann <marcel@holtmann.org> told me that...

Show 31 quoted lines
> Hi Petr,
> 
> > > let me be more specific. It only works in the fast forward case. If we
> > > actually must merge the trees, because I have local committed changes
> > > and not committed changes, I see this:
> > > 
> > > link 74966c42ddd874192c318acfc5f013e56c50606a
> > > link b27ddcd47e293557e0605b98b2a1e8429035cdc5
> > > link 568ad7814e266f84b4ac28c15a0cadfb2fdb6c80
> > > Tree change: f345b0a066572206aac4a4f9a57d746e213b6bff:74966c42ddd874192c318acfc5f013e56c50606a
> > > :100644 100644 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 568ad7814e266f84b4ac28c15a0cadfb2fdb6c80 M      README
> > > 
> > > Applying changes...
> > > usage.c: needs update
> > > cg-merge: merge blocked: local changes
> > > 
> > > I changed the README in test1 repository and committed it. Then I
> > > changed Makefile in test2 repository and committed it. After that I
> > > modified usage.c and left it uncommitted. Then I pulled in the README
> > > change from test1 repository.
> > 
> > yes, and that is all right. If you are actually doing the merge with
> > commit, you need to have the tree clean before, since any changes you
> > make to the tree are counted as conflict fixes, and you don't want your
> > older changes to mix into that.
> 
> but not if the merge does not conflict with the local changes. This is
> what Bitkeeper is doing. It lets you pull new stuff as long as it does
> not conflict with your local uncommitted changes. Actually I liked that
> feature a lot, because I was able the follow the latest Linux mainline
> tree and work on my stuff.

Well, I guess we could allow this to happen if there are no conflicts whatsoever, but as soon as _any_ conflicts appear in the tree, we would have to bail out screaming panic, asking you to commit your stuff. Actually, if you've already committed something locally, why don't you commit everything locally and keep some uncommitted changes on the top?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Marcel HoltmannNext: Dan Holmsand
Message 7 of 12 in “cg-update with local uncommitted changes”
  1. Marcel HoltmannMay 30, 2005
  2. Petr BaudisMay 30, 2005
  3. Marcel HoltmannMay 30, 2005
  4. Marcel HoltmannMay 30, 2005
  5. Petr BaudisJun 2, 2005
  6. Marcel HoltmannJun 2, 2005
  7. Petr BaudisJun 5, 2005
  8. Dan HolmsandMay 30, 2005
  9. Petr BaudisMay 31, 2005
  10. Dan HolmsandMay 31, 2005
  11. Zack BrownMay 30, 2005
  12. Petr BaudisMay 31, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.