{"thread":{"id":"54837","subject":"Fwd: Bug in `git add -N xyz ; git stash` command","startedAt":"2020-12-16T10:49:28Z","lastAt":"2020-12-17T19:43:22Z","messageCount":4,"participants":["Σταύρος Ντέντος","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"412353","messageId":"CAHMHMxW_zwq_xK3Mh5QjC4dM1muVotESZdGQkRAx8xeKYmHzbw@mail.gmail.com","threadId":"54837","inReplyTo":"CAHMHMxW-LwjLWF9PPuSJmbAafw37d_18j+HmOd4+8MKbajb_8A@mail.gmail.com","subject":"Fwd: Bug in `git add -N xyz ; git stash` command","fromName":"Σταύρος Ντέντος","fromEmail":"stdedos@gmail.com","sentAt":"2020-12-16T10:48:04Z","receivedAt":"2020-12-16T10:49:28Z","isPatch":false,"sender":{"key":"stdedos@gmail.com","avatar":null},"body":"Hello there,\n\nI think I have found a bug with the following series of commands:\n\n$ git add -N xyz ; git stash\nerror: Entry 'xyz' not uptodate. Cannot merge.\nCannot save the current worktree state\n\nIt has bothered me that `git add -N xyz` \"is not obvious that it is\ndone\", unless you know that you did it - and now it seems that there\nis some buggy behavior about that.\nI could've sworn that there is not even a file change on the\nrepository (because I sync it between a VM, and after a `git pull` I\nsaw 3 file changes, two of them being the branch head and the log\nbranch head)\n\nWith regards,\nNtentos Stavros\n\n\n---------- Forwarded message ---------\nFrom: Σταύρος Ντέντος <stdedos@gmail.com>\nDate: Wed, 16 Dec 2020 at 12:32\nSubject: Bug in `git add -N xyz ; git stash` command\nTo: git <git@vger.kernel.org>\n\n\nHello there,\n\nI think I have found a bug with the following series of commands:\n\n$ git add -N xyz ; git stash\nerror: Entry 'xyz' not uptodate. Cannot merge.\nCannot save the current worktree state\n\nIt has bothered me that `git add -N xyz` \"is not obvious that it is\ndone\", unless you know that you did it - and now it seems that there\nis some buggy behavior about that.\nI could've sworn that there is not even a file change on the\nrepository (because I sync it between a VM, and after a `git pull` I\nsaw 3 file changes, two of them being the branch head and the log\nbranch head)\n\nWith regards,\nNtentos Stavros\n"},{"id":"412422","messageId":"xmqq1rfp4l35.fsf@gitster.c.googlers.com","threadId":"54837","inReplyTo":"CAHMHMxW_zwq_xK3Mh5QjC4dM1muVotESZdGQkRAx8xeKYmHzbw@mail.gmail.com","subject":"Re: Fwd: Bug in `git add -N xyz ; git stash` command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-12-16T19:17:18Z","receivedAt":"2020-12-16T19:18:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Σταύρος Ντέντος  <stdedos@gmail.com> writes:\n\n> I think I have found a bug with the following series of commands:\n>\n> $ git add -N xyz ; git stash\n> error: Entry 'xyz' not uptodate. Cannot merge.\n> Cannot save the current worktree state\n>\n> It has bothered me that `git add -N xyz` \"is not obvious that it is\n> done\", unless you know that you did it - and now it seems that there\n> is some buggy behavior about that.\n\nHmph, is this the same issue as what we discussed in\n\nhttps://lore.kernel.org/git/CA+dzEBmh4LdN-XFS9y9YKrDMzV_7+QpDzBA2uv9Xi80PgR5NTQ@mail.gmail.com/\n\nI wonder.\n"},{"id":"412484","messageId":"CAHMHMxUdt1cxE1UkjbjUxpL=4fcjrE64udR6YJidbzLJS0ca2w@mail.gmail.com","threadId":"54837","inReplyTo":"xmqq1rfp4l35.fsf@gitster.c.googlers.com","subject":"Re: Fwd: Bug in `git add -N xyz ; git stash` command","fromName":"Σταύρος Ντέντος","fromEmail":"stdedos@gmail.com","sentAt":"2020-12-17T08:43:20Z","receivedAt":"2020-12-17T08:44:54Z","isPatch":false,"sender":{"key":"stdedos@gmail.com","avatar":null},"body":"It seems like it, yes.\n\nNot deciding to fix that (or not agreeing on how to fix it), should be\northogonal from the \"what does the error message says\" about it.\nI would expect something like \"'xyz' is marked with intent-to-add;\neither stage (git add xyz) or remove the file (git ... xyz); refusing\nto stage.\"\n\nWith regards,\nNtentos Stavros\n\nOn Wed, 16 Dec 2020 at 21:17, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Σταύρος Ντέντος  <stdedos@gmail.com> writes:\n>\n> > I think I have found a bug with the following series of commands:\n> >\n> > $ git add -N xyz ; git stash\n> > error: Entry 'xyz' not uptodate. Cannot merge.\n> > Cannot save the current worktree state\n> >\n> > It has bothered me that `git add -N xyz` \"is not obvious that it is\n> > done\", unless you know that you did it - and now it seems that there\n> > is some buggy behavior about that.\n>\n> Hmph, is this the same issue as what we discussed in\n>\n> https://lore.kernel.org/git/CA+dzEBmh4LdN-XFS9y9YKrDMzV_7+QpDzBA2uv9Xi80PgR5NTQ@mail.gmail.com/\n>\n> I wonder.\n"},{"id":"412499","messageId":"xmqq1rfoz0b7.fsf@gitster.c.googlers.com","threadId":"54837","inReplyTo":"CAHMHMxUdt1cxE1UkjbjUxpL=4fcjrE64udR6YJidbzLJS0ca2w@mail.gmail.com","subject":"Re: Fwd: Bug in `git add -N xyz ; git stash` command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-12-17T19:42:36Z","receivedAt":"2020-12-17T19:43:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Σταύρος Ντέντος  <stdedos@gmail.com> writes:\n\n> Not deciding to fix that (or not agreeing on how to fix it), should be\n> orthogonal from the \"what does the error message says\" about it.\n> I would expect something like \"'xyz' is marked with intent-to-add;\n> either stage (git add xyz) or remove the file (git ... xyz); refusing\n> to stage.\"\n\n\"refusing to stash\", you mean?\n\nI think that your wording may be an improvement.  Care to whip up a\npatch?\n\nThanks.\n"}]}