From: Junio C Hamano <gitster@pobox.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: "git revert" feature suggestion: revert the last commit to a file
Date: Thu, 05 Feb 2009 16:15:33 -0800 [thread overview]
Message-ID: <7vhc38a09m.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090205210018.GB21500@elte.hu> (Ingo Molnar's message of "Thu, 5 Feb 2009 22:00:18 +0100")
Ingo Molnar <mingo@elte.hu> writes:
> * Junio C Hamano <gitster@pobox.com> wrote:
>
>> Ingo Molnar <mingo@elte.hu> writes:
>>
>> > So i have to do something like:
>> >
>> > git revert $(git log -1 --pretty=format:"%h" kernel/softlockup.c)
>> >
>> > (tucked away in a tip-revert-file helper script.)
>> >
>> > But it would be so much nicer if i could do the intuitive:
>> >
>> > git revert kernel/softlockup.c
>> >
>> > Or at least, to separate it from revision names cleanly, something like:
>> >
>> > git revert -- kernel/softlockup.c
>>
>> All three shares one issue. Does the syntax offer you a way to give
>> enough information so that you can confidently say that it will find the
>> commit that touched the path most recently? How is the "most recently"
>> defined?
>>
>> At least you can restate the first one to:
>>
>> git revert $(git log -1 --pretty=format:"%h" core/softlockup -- kernel/softlockup.c)
>>
>> to limit to "the one that touched this file _on this topic_".
>
> All in the current scope of the integration branch, sure. I.e. the same
> scope of commits that "git log kernel/softlockup.c" uses.
But that is not how ":/syntax" works, at least right now. It traverses
from tips of all refs and finds the newest one. It might make sense to
make the discovery start from the current branch not from all tips.
next prev parent reply other threads:[~2009-02-06 0:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 20:21 "git revert" feature suggestion: revert the last commit to a file Ingo Molnar
2009-02-05 20:50 ` Johannes Schindelin
2009-02-05 20:50 ` Junio C Hamano
2009-02-05 20:54 ` Randy Dunlap
2009-02-05 21:00 ` Ingo Molnar
2009-02-05 21:03 ` Randy Dunlap
2009-02-05 21:46 ` Ingo Molnar
2009-02-05 21:00 ` Ingo Molnar
2009-02-06 0:15 ` Junio C Hamano [this message]
2009-02-06 0:41 ` 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=7vhc38a09m.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=mingo@elte.hu \
/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).