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

Re: [WARNING] Proposed future changes that are backward incompatible

From
Nicolas Pitre <nico@cam.org>
Date
Feb 27, 2009, 19:42 UTC
Message-ID
<alpine.LFD.2.00.0902271439310.5511@xanadu.home>
In-Reply-To
<20090227192708.6266.qmail@science.horizon.com>
On Fri, 27 Feb 2009, George Spelvin wrote:
> There's one more change that was suggested that I'd like to propose:
> - Make "git grep" search the whole repository by default; include an
>   explicit "." path limiter to search only the current directory.
Isn't that already the default?

[nico@xanadu git]$ git grep Alice Documentation/gittutorial.txt:Suppose that Alice has started a new project with a git repository in Documentation/gittutorial.txt:This creates a new directory "myrepo" containing a clone of Alice's Documentation/gittutorial.txt:When he's ready, he tells Alice to pull changes from the repository Documentation/gittutorial.txt:This merges the changes from Bob's "master" branch into Alice's Documentation/gittutorial.txt:current branch. If Alice has made her own changes in the meantime, Documentation/gittutorial.txt:Note that in general, Alice would want her local changes committed before Documentation/gittutorial.txt:initiating this "pull". If Bob's work conflicts with what Alice did since Documentation/gittutorial.txt:their histories forked, Alice will use her working tree and the index to Documentation/gittutorial.txt:refuse to merge --- Alice will have to get rid of her local changes in Documentation/gittutorial.txt:Alice can peek at what Bob did without merging first, using the "fetch" Documentation/gittutorial.txt:command; this allows Alice to inspect what Bob did, using a special Documentation/gittutorial.txt:This operation is safe even if Alice has uncommitted local changes. Documentation/gittutorial.txt:Alice already knows everything that leads to her current state (HEAD), Documentation/gittutorial.txt:If Alice wants to visualize what Bob did since their histories forked Documentation/gittutorial.txt:Alice may want to view what both of them did since they forked. Documentation/gittutorial.txt:After inspecting what Bob did, if there is nothing urgent, Alice may Documentation/gittutorial.txt:does have something Alice would immediately need, Alice may choose to Documentation/gittutorial.txt:With this, Alice can perform the first part of the "pull" operation alone using the Documentation/gittutorial.txt:Unlike the longhand form, when Alice fetches from Bob using a Documentation/gittutorial.txt:Alice's master branch. Documentation/gittutorial.txt:After examining those changes, Alice Documentation/gittutorial.txt:Later, Bob can update his repo with Alice's latest changes using Documentation/gittutorial.txt:Note that he doesn't need to give the path to Alice's repository; Documentation/gittutorial.txt:when Bob cloned Alice's repository, git stored the location of her Documentation/gittutorial.txt:Git also keeps a pristine copy of Alice's master branch under the t/t5519-push-alternates.sh: # Project Bob is a fork of project Alice t/t5519-push-alternates.sh: # Bob acquires what Alice did in his work tree first. t/t5519-push-alternates.sh: # need to send the commit Bob received from Alice t/t5519-push-alternates.sh: # to his public repository, as all the object Alice t/t5519-push-alternates.sh: # Check that the second commit by Alice is not sent t/t5519-push-alternates.sh: # Alice does not care what Bob does. She does not t/t5519-push-alternates.sh: # This time Bob does not pull from Alice, and t/t5519-push-alternates.sh: # Alice does not care what Bob does. She does not t/t5519-push-alternates.sh: # This time Bob does not pull from Alice, and t/t5519-push-alternates.sh: # necessary tree) in his repository from Alice.

Nicolas
Previous: George SpelvinNext: Sverre Rabbelier
Message 2 of 9 in “Re: [WARNING] Proposed future changes that are backward incompatible”
  1. George SpelvinFeb 27, 2009
  2. Nicolas PitreFeb 27, 2009
  3. Sverre RabbelierFeb 27, 2009
  4. Johannes SchindelinFeb 27, 2009
  5. Pascal ObryFeb 27, 2009
  6. Junio C HamanoFeb 27, 2009
  7. George SpelvinFeb 27, 2009
  8. Junio C HamanoFeb 27, 2009
  9. Markus HeidelbergFeb 28, 2009

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.