git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
To: git@vger.kernel.org
Subject: Small issue with "add untracked" option of 'git add -i'
Date: Mon, 12 Jun 2017 20:03:35 +0530	[thread overview]
Message-ID: <1497278015.7302.13.camel@gmail.com> (raw)

Hello all,

There seems to be a small issue with the output of the "add untracked"
option of 'git add -i'. Consider the following scenario,

* A user makes a change to a tracked file
* His repo has a few untracked files which he has left it in that way
intentionally
* He chooses to use 'git add -i' to stage changes
* He chooses option 4, accidentally, instead of option 5. He is shown
the following menu,

> *** Commands ***
>   1: status	  2: update	  3: revert	  4: add
> untracked
>   5: patch	  6: diff	  7: quit	  8: help
> What now> 4
>   1: test-file
> Add untracked>> 

* He exits by hitting return but he is shown this weird message found
below.

> No untracked files.

* He is surprised on seeing this.

Why is that message shown when "there are untracked files" but the user
doesn't add them to the staging area ? If that message is relative to
the staging area shouldn't it be made more explicit? Further in that
case it doesn't seem to be consistent with the another output shown in
the scenario in which the developer chooses the 'add untracked' option
when he really doesn't have any untracked files in his working
directory.

> *** Commands ***
>   1: status	  2: update	  3: revert	  4: add
> untracked
>   5: patch	  6: diff	  7: quit	  8: help
> What now> 4
> No untracked files.
> 


-- 
Regards,
Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>

             reply	other threads:[~2017-06-12 14:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 14:33 Kaartic Sivaraam [this message]
2017-06-12 17:38 ` Small issue with "add untracked" option of 'git add -i' Junio C Hamano
2017-06-12 17:58   ` Kaartic Sivaraam
2017-06-12 17:59   ` Junio C Hamano
2017-06-14 13:04     ` Kaartic Sivaraam
2017-06-15  6:50       ` Kaartic Sivaraam
2017-06-21  2:55     ` Kaartic Sivaraam
2017-06-21  4:52       ` Kevin Daudt
2017-06-21 12:05         ` Kaartic Sivaraam
2017-06-22  3:13     ` Kaartic Sivaraam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497278015.7302.13.camel@gmail.com \
    --to=kaarticsivaraam91196@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).