From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Johannes.Schindelin@gmx.de
Cc: git@vger.kernel.org, jasampler@gmail.com, gitster@pobox.com
Subject: git reset -- path weirdness
Date: Sat, 3 Nov 2007 12:17:43 +0100 [thread overview]
Message-ID: <20071103111743.GA29358@atjola.homenet> (raw)
Hi,
I noticed some weirdness with git reset when a path is given. Basically
it seems to cycle the file through 3 states: unstaged, unmerged,
deleted(!) which is IMHO weird at best. A bisection showed that the
behaviour was introduced with the shell -> conversion of git-reset.
Extra annoyance is caused by the fact that "git status" tells you to add
the file when it is in the unmerged state, but that doesn't do anything.
Log of "git reset" switching through the states:
doener@atjola:git (master) $ git status
# On branch master
nothing to commit (working directory clean)
doener@atjola:git (master) $ git reset -- builtin-reset.c
builtin-reset.c: needs merge
doener@atjola:git (master) $ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
#
# unmerged: builtin-reset.c
#
no changes added to commit (use "git add" and/or "git commit -a")
doener@atjola:git (master) $ git reset -- builtin-reset.c
doener@atjola:git (master) $ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# deleted: builtin-reset.c
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# builtin-reset.c
doener@atjola:git (master) $ git reset -- builtin-reset.c
doener@atjola:git (master) $ git status
# On branch master
nothing to commit (working directory clean)
Thanks,
Björn
next reply other threads:[~2007-11-03 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-03 11:17 Björn Steinbrink [this message]
2007-11-03 12:03 ` git reset -- path weirdness Johannes Schindelin
2007-11-03 13:12 ` [PATCH] git-reset: do not be confused if there is nothing to reset Johannes Schindelin
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=20071103111743.GA29358@atjola.homenet \
--to=b.steinbrink@gmx.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jasampler@gmail.com \
/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