All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git <git@vger.kernel.org>, Christian Couder <chriscool@tuxfamily.org>
Subject: Re: Is there a "git reset --keep <sha1> || git reset --hard <sha1>" alternative?
Date: Wed, 20 Apr 2016 12:03:42 -0700	[thread overview]
Message-ID: <xmqqvb3cumpd.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CACBZZX6k6sFv2GWOzu0Ow1T+5ci2gmMOvaD37bvbm1_qfetr8Q@mail.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Wed, 20 Apr 2016 19:18:14 +0200")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

>     $ ls -l INSTALL ; chmod 600 INSTALL ; git reset --hard @{u} ; ls -l INSTALL
>     -rw-r--r-- 1 avar avar 9147 Apr 20 17:11 INSTALL
>     HEAD is now at e6ac6e1 Fifth batch for post 2.8 cycle
>     -rw-r--r-- 1 avar avar 9147 Apr 20 17:12 INSTALL

A quick question.  What happens when you did this instead?

	chmod 600 INSTALL
        git update-index --refresh
        git reset --hard

Does it match what you want to see?

The reason I ask is because I recall making a deliberate design
decision around this area.

  reply	other threads:[~2016-04-20 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 17:18 Is there a "git reset --keep <sha1> || git reset --hard <sha1>" alternative? Ævar Arnfjörð Bjarmason
2016-04-20 19:03 ` Junio C Hamano [this message]
2016-04-20 20:28   ` Ævar Arnfjörð Bjarmason

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=xmqqvb3cumpd.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.