git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Fwd: Bug in `git add -N xyz ; git stash` command
       [not found] <CAHMHMxW-LwjLWF9PPuSJmbAafw37d_18j+HmOd4+8MKbajb_8A@mail.gmail.com>
@ 2020-12-16 10:48 ` Σταύρος Ντέντος
  2020-12-16 19:17   ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Σταύρος Ντέντος @ 2020-12-16 10:48 UTC (permalink / raw)
  To: git

Hello there,

I think I have found a bug with the following series of commands:

$ git add -N xyz ; git stash
error: Entry 'xyz' not uptodate. Cannot merge.
Cannot save the current worktree state

It has bothered me that `git add -N xyz` "is not obvious that it is
done", unless you know that you did it - and now it seems that there
is some buggy behavior about that.
I could've sworn that there is not even a file change on the
repository (because I sync it between a VM, and after a `git pull` I
saw 3 file changes, two of them being the branch head and the log
branch head)

With regards,
Ntentos Stavros


---------- Forwarded message ---------
From: Σταύρος Ντέντος <stdedos@gmail.com>
Date: Wed, 16 Dec 2020 at 12:32
Subject: Bug in `git add -N xyz ; git stash` command
To: git <git@vger.kernel.org>


Hello there,

I think I have found a bug with the following series of commands:

$ git add -N xyz ; git stash
error: Entry 'xyz' not uptodate. Cannot merge.
Cannot save the current worktree state

It has bothered me that `git add -N xyz` "is not obvious that it is
done", unless you know that you did it - and now it seems that there
is some buggy behavior about that.
I could've sworn that there is not even a file change on the
repository (because I sync it between a VM, and after a `git pull` I
saw 3 file changes, two of them being the branch head and the log
branch head)

With regards,
Ntentos Stavros

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fwd: Bug in `git add -N xyz ; git stash` command
  2020-12-16 10:48 ` Fwd: Bug in `git add -N xyz ; git stash` command Σταύρος Ντέντος
@ 2020-12-16 19:17   ` Junio C Hamano
  2020-12-17  8:43     ` Σταύρος Ντέντος
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2020-12-16 19:17 UTC (permalink / raw)
  To: Σταύρος Ντέντος
  Cc: git

Σταύρος Ντέντος  <stdedos@gmail.com> writes:

> I think I have found a bug with the following series of commands:
>
> $ git add -N xyz ; git stash
> error: Entry 'xyz' not uptodate. Cannot merge.
> Cannot save the current worktree state
>
> It has bothered me that `git add -N xyz` "is not obvious that it is
> done", unless you know that you did it - and now it seems that there
> is some buggy behavior about that.

Hmph, is this the same issue as what we discussed in

https://lore.kernel.org/git/CA+dzEBmh4LdN-XFS9y9YKrDMzV_7+QpDzBA2uv9Xi80PgR5NTQ@mail.gmail.com/

I wonder.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fwd: Bug in `git add -N xyz ; git stash` command
  2020-12-16 19:17   ` Junio C Hamano
@ 2020-12-17  8:43     ` Σταύρος Ντέντος
  2020-12-17 19:42       ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Σταύρος Ντέντος @ 2020-12-17  8:43 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

It seems like it, yes.

Not deciding to fix that (or not agreeing on how to fix it), should be
orthogonal from the "what does the error message says" about it.
I would expect something like "'xyz' is marked with intent-to-add;
either stage (git add xyz) or remove the file (git ... xyz); refusing
to stage."

With regards,
Ntentos Stavros

On Wed, 16 Dec 2020 at 21:17, Junio C Hamano <gitster@pobox.com> wrote:
>
> Σταύρος Ντέντος  <stdedos@gmail.com> writes:
>
> > I think I have found a bug with the following series of commands:
> >
> > $ git add -N xyz ; git stash
> > error: Entry 'xyz' not uptodate. Cannot merge.
> > Cannot save the current worktree state
> >
> > It has bothered me that `git add -N xyz` "is not obvious that it is
> > done", unless you know that you did it - and now it seems that there
> > is some buggy behavior about that.
>
> Hmph, is this the same issue as what we discussed in
>
> https://lore.kernel.org/git/CA+dzEBmh4LdN-XFS9y9YKrDMzV_7+QpDzBA2uv9Xi80PgR5NTQ@mail.gmail.com/
>
> I wonder.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fwd: Bug in `git add -N xyz ; git stash` command
  2020-12-17  8:43     ` Σταύρος Ντέντος
@ 2020-12-17 19:42       ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2020-12-17 19:42 UTC (permalink / raw)
  To: Σταύρος Ντέντος
  Cc: git

Σταύρος Ντέντος  <stdedos@gmail.com> writes:

> Not deciding to fix that (or not agreeing on how to fix it), should be
> orthogonal from the "what does the error message says" about it.
> I would expect something like "'xyz' is marked with intent-to-add;
> either stage (git add xyz) or remove the file (git ... xyz); refusing
> to stage."

"refusing to stash", you mean?

I think that your wording may be an improvement.  Care to whip up a
patch?

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-17 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAHMHMxW-LwjLWF9PPuSJmbAafw37d_18j+HmOd4+8MKbajb_8A@mail.gmail.com>
2020-12-16 10:48 ` Fwd: Bug in `git add -N xyz ; git stash` command Σταύρος Ντέντος
2020-12-16 19:17   ` Junio C Hamano
2020-12-17  8:43     ` Σταύρος Ντέντος
2020-12-17 19:42       ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).