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

Re: [PATCH] cherry-pick/revert: transparently refresh index

From
PWPete Wyckoff <pw@padd.com>
Date
Oct 31, 2010, 22:26 UTC
Message-ID
<20101031222644.GA31257@arf.padd.com>
In-Reply-To
<20101031195933.GA21240@burratino>
jrnieder@gmail.com wrote on Sun, 31 Oct 2010 14:59 -0500:
Show 12 quoted lines
> A stat-dirty index is not a detail that ought to concern the operator
> of porcelain such as "git cherry-pick".
> 
> Without this change, a cherry-pick after copying a worktree with rsync
> errors out with a misleading message.
> 
> 	$ git cherry-pick build/top
> 	error: Your local changes to 'file.h' would be overwritten by merge.  Aborting.
> 	Please, commit your changes or stash them before you can merge.
> 
> Noticed-by: Pete Wyckoff <pw@padd.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks, this works well. I tested it and am happy with the change. It is needed for correctness.

Since I know that I just copied the repo, I'd prefer not to make people wait to refresh the index. A new flag to update-index improves performance by avoiding the initial re-read of all files in the repository. Patch follows in next mail.

		-- Pete
Previous: Jonathan NiederNext: Pete Wyckoff
Message 6 of 16 in “index rebuild for cloned repo”
  1. Pete WyckoffOct 31, 2010
  2. Jonathan NiederOct 31, 2010
  3. cherry-pick/revert: transparently refresh indexJonathan Nieder, Oct 31, 2010
  4. Andreas SchwabOct 31, 2010
  5. Jonathan NiederOct 31, 2010
  6. Pete WyckoffOct 31, 2010
  7. teach update-index --refresh about --data-unchangedPete Wyckoff, Oct 31, 2010
  8. Junio C HamanoNov 3, 2010
  9. Jonathan NiederNov 3, 2010
  10. Pete WyckoffNov 3, 2010
  11. Pete WyckoffNov 14, 2010
  12. Jonathan NiederNov 14, 2010
  13. Johannes SixtNov 1, 2010
  14. Junio C HamanoNov 3, 2010
  15. Johannes SixtNov 3, 2010
  16. Nguyen Thai Ngoc DuyNov 1, 2010

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.