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

Re: Pushing into a repository with working directory?

From
Andy Whitcroft <apw@shadowen.org>
Date
Jan 5, 2007, 09:32 UTC
Message-ID
<459E1B23.4060400@shadowen.org>
In-Reply-To
<7vwt41j1le.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 10 quoted lines
> Andy Whitcroft <apw@shadowen.org> writes:
> 
>> Special casing the 'current' branch makes any sort of automated push
>> setup unreliable.  Indeed the special case preventing a fetch into the
>> current branch is pretty annoying for the same reason.  I would almost
>> prefer to relax that than add the same for push.
> 
> How would you relax the fetch case?  Fetching into the current
> branch, unless the repository is bare, is always a fishy
> operation.

Is it fishy if the working directory and index match HEAD? If not, then we could detect that and allow update in that case?

Also, if we had dangling head support we could "leave" HEAD pointing to the starting commit, and emit a nice fat warning.

-apw
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 11 in “Pushing into a repository with working directory?”
  1. Shawn O. PearceJan 2, 2007
  2. Andy WhitcroftJan 5, 2007
  3. Junio C HamanoJan 5, 2007
  4. Andy WhitcroftJan 5, 2007
  5. Junio C HamanoJan 5, 2007
  6. Shawn O. PearceJan 5, 2007
  7. Andy WhitcroftJan 8, 2007
  8. Junio C HamanoJan 9, 2007
  9. Shawn O. PearceJan 9, 2007
  10. Andreas EricssonJan 9, 2007
  11. Johannes SchindelinJan 9, 2007

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.