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

Re: [PATCH] read-tree.txt: clarify --reset and worktree changes

From
Duy Nguyen <pclouds@gmail.com>
Date
Apr 1, 2019, 12:02 UTC
Message-ID
<CACsJy8B1Bp6=H_pKTfaZtucxod-SK3X+gb6zMJfmxBy8ep0PPA@mail.gmail.com>
In-Reply-To
<xmqqmulauhmv.fsf@gitster-ct.c.googlers.com>
On Mon, Apr 1, 2019 at 5:47 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
>
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
> > diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
> > index 5c70bc2878..12a25bc954 100644
> > --- a/Documentation/git-read-tree.txt
> > +++ b/Documentation/git-read-tree.txt
> > @@ -38,8 +38,9 @@ OPTIONS
> >       started.
> >
> >  --reset::
> > -        Same as -m, except that unmerged entries are discarded
> > -        instead of failing.
> > +     Same as -m, except that unmerged entries are discarded
> > +     instead of failing. If `-u` is used, updates leading to loss
> > +     of local changes will not abort the operation.
>
> "git add $file" makes a local change to the index at path $file",
> and reverting that local change is what "read-tree --reset"
> primarily does.

That sounds more like "reset $file" than "read-tree --reset" actually, which works on a full tree instead of a path.

Show 5 quoted lines
> The difference cased by presence or lack of "-u" is only about the
> working tree files, so s/local/working tree/ perhaps?
>
> I'd also phrase s/If `-u` is used/When used with `-u`/ if I were
> writing this.
Updated. v2 coming.
Show 6 quoted lines
>
> Thanks.
>
> >
> >  -u::
> >       After a successful merge, update the files in the work
-- 
Duy
Previous: Junio C HamanoNext: Nguyễn Thái Ngọc Duy
Message 3 of 4 in “read-tree.txt: clarify --reset and worktree changes”
  1. read-tree.txt: clarify --reset and worktree changesNguyễn Thái Ngọc Duy, Mar 26, 2019
  2. Junio C HamanoApr 1, 2019
  3. Duy NguyenApr 1, 2019
  4. read-tree.txt: clarify --reset and worktree changesNguyễn Thái Ngọc Duy, Apr 1, 2019

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.