git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Teodosio <nathan.teodosio@canonical.com>
To: git@vger.kernel.org
Subject: Tracked file cannot be added, mentions to sparse checkout that I don't have.
Date: Tue, 30 Jul 2024 12:29:26 +0200	[thread overview]
Message-ID: <20240730122926.638a9263@canonical> (raw)

What did you do before the bug happened? (Steps to reproduce your issue)

I modified a tracked file.

What did you expect to happen? (Expected behavior)

The file is listed as modified in git status and added with git add etc.,
i.e. the usual commit routine.

What happened instead? (Actual behavior)

I cannot add or commit the changes done to that file.

--->
% echo 1 >> snapcraft.yaml
% tail -n1 snapcraft.yaml
1
# I expected snapcraft.yaml to show here:
% git status -s
?? git-bugreport-2024-07-30-1212.txt
# I expected snapcraft.yaml to be added here:
% git add snapcraft.yaml
The following paths and/or pathspecs matched paths that exist
outside of your sparse-checkout definition, so will not be
updated in the index:
snapcraft.yaml
hint: If you intend to update such entries, try one of the following:
hint: * Use the --sparse option.
hint: * Disable or modify the sparsity rules.
hint: Disable this message with "git config advice.updateSparsePath false"
<---

What's different between what you expected and what actually happened?

The difference is that the file cannot be added or commited, as if no changes
had been made to it.

Anything else you want to add:

--->
% git branch --show-current
dev
% git ls-tree -r dev --name-only|grep snapcraft
snapcraft.yaml
% git sparse-checkout list
fatal: this worktree is not sparse
<---

Git was yesterday in my system updated and I never encountered
anything similar to this issue before.

--->
% grep ' installed git:' /var/log/dpkg.log
2024-07-29 10:37:19 status installed git:amd64 1:2.45.2-1ubuntu1
<---

Git does recognize modifications to another file in the same directory,
so I am completely stumped what is special about this snapcraft.yaml.


[System Info]
git version:
git version 2.45.2
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20
00:40:06 UTC 2024 x86_64 compiler info: gnuc: 13.2
libc info: glibc: 2.39
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]

             reply	other threads:[~2024-07-30 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 10:29 Nathan Teodosio [this message]
2024-07-30 22:40 ` Tracked file cannot be added, mentions to sparse checkout that I don't have brian m. carlson

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=20240730122926.638a9263@canonical \
    --to=nathan.teodosio@canonical.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).