* [PATCH 1/2] Document the master@{n} reflog query syntax.
@ 2007-01-18 2:08 Shawn O. Pearce
2007-01-18 2:30 ` Jim Treadway
0 siblings, 1 reply; 5+ messages in thread
From: Shawn O. Pearce @ 2007-01-18 2:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In ab2a1a32 Junio improved the reflog query logic to support
obtaining the n-th prior value of a ref, but this was never
documented in git-rev-parse. Now it is.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
Documentation/git-rev-parse.txt | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 4eaf5a0..7bfbe1b 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -148,10 +148,18 @@ blobs contained in a commit.
enclosed in a brace
pair (e.g. '\{yesterday\}', '\{1 month 2 weeks 3 days 1 hour 1
second ago\}' or '\{1979-02-26 18:30:00\}') to specify the value
- of the ref at a prior point in time. This suffix may only be
+ of the ref at a prior point in time.This suffix may only be
used immediately following a ref name and the ref must have an
existing log ($GIT_DIR/logs/<ref>).
+* A ref followed by the suffix '@' with an ordinal specification
+ enclosed in a brace pair (e.g. '\{1\}', '\{15\}') to specify
+ the n-th prior value of that ref. For example 'master@\{1\}'
+ is the immediate prior value of 'master' while 'master@\{5\}'
+ is the 5th prior value of 'master'. This suffix may only be used
+ immediately following a ref name and the ref must have an existing
+ log ($GIT_DIR/logs/<ref>).
+
* A suffix '{caret}' to a revision parameter means the first parent of
that commit object. '{caret}<n>' means the <n>th parent (i.e.
'rev{caret}'
--
1.5.0.rc1.g556b
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Document the master@{n} reflog query syntax.
2007-01-18 2:08 [PATCH 1/2] Document the master@{n} reflog query syntax Shawn O. Pearce
@ 2007-01-18 2:30 ` Jim Treadway
2007-01-18 2:50 ` Shawn O. Pearce
0 siblings, 1 reply; 5+ messages in thread
From: Jim Treadway @ 2007-01-18 2:30 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Junio C Hamano, git
On Wed, 17 Jan 2007, Shawn O. Pearce wrote:
> In ab2a1a32 Junio improved the reflog query logic to support
> obtaining the n-th prior value of a ref, but this was never
> documented in git-rev-parse. Now it is.
>
> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
> ---
> Documentation/git-rev-parse.txt | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
> index 4eaf5a0..7bfbe1b 100644
> --- a/Documentation/git-rev-parse.txt
> +++ b/Documentation/git-rev-parse.txt
> @@ -148,10 +148,18 @@ blobs contained in a commit.
> enclosed in a brace
> pair (e.g. '\{yesterday\}', '\{1 month 2 weeks 3 days 1 hour 1
> second ago\}' or '\{1979-02-26 18:30:00\}') to specify the value
> - of the ref at a prior point in time. This suffix may only be
> + of the ref at a prior point in time.This suffix may only be
I'm guessing that the above was unintentional?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Document the master@{n} reflog query syntax.
2007-01-18 2:30 ` Jim Treadway
@ 2007-01-18 2:50 ` Shawn O. Pearce
2007-01-18 10:33 ` Andreas Ericsson
0 siblings, 1 reply; 5+ messages in thread
From: Shawn O. Pearce @ 2007-01-18 2:50 UTC (permalink / raw)
To: Jim Treadway; +Cc: Junio C Hamano, git
Jim Treadway <jim@stardot-tech.com> wrote:
> On Wed, 17 Jan 2007, Shawn O. Pearce wrote:
> >- of the ref at a prior point in time. This suffix may only be
> >+ of the ref at a prior point in time.This suffix may only be
>
> I'm guessing that the above was unintentional?
Yes. Danngit. Junio, can you hand edit that patch?
--
Shawn.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Document the master@{n} reflog query syntax.
2007-01-18 2:50 ` Shawn O. Pearce
@ 2007-01-18 10:33 ` Andreas Ericsson
2007-01-18 15:48 ` Shawn O. Pearce
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Ericsson @ 2007-01-18 10:33 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Jim Treadway, Junio C Hamano, git
Shawn O. Pearce wrote:
> Jim Treadway <jim@stardot-tech.com> wrote:
>> On Wed, 17 Jan 2007, Shawn O. Pearce wrote:
>>> - of the ref at a prior point in time. This suffix may only be
>>> + of the ref at a prior point in time.This suffix may only be
>> I'm guessing that the above was unintentional?
>
> Yes. Danngit. Junio, can you hand edit that patch?
>
I'm starting to see --amend as an extremely useful thing to have, and
I'm sure Junio thinks the same. For fixes this small, it sure is easier
to just --amend the commit than to ask for a new patch to apply.
Out of curiousity, how many other SCM's allow you to --amend a commit?
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Document the master@{n} reflog query syntax.
2007-01-18 10:33 ` Andreas Ericsson
@ 2007-01-18 15:48 ` Shawn O. Pearce
0 siblings, 0 replies; 5+ messages in thread
From: Shawn O. Pearce @ 2007-01-18 15:48 UTC (permalink / raw)
To: Andreas Ericsson; +Cc: Jim Treadway, Junio C Hamano, git
Andreas Ericsson <ae@op5.se> wrote:
> Shawn O. Pearce wrote:
> >Jim Treadway <jim@stardot-tech.com> wrote:
> >>On Wed, 17 Jan 2007, Shawn O. Pearce wrote:
> >>>- of the ref at a prior point in time. This suffix may only be
> >>>+ of the ref at a prior point in time.This suffix may only be
> >>I'm guessing that the above was unintentional?
> >
> >Yes. Danngit. Junio, can you hand edit that patch?
> >
>
> I'm starting to see --amend as an extremely useful thing to have, and
> I'm sure Junio thinks the same. For fixes this small, it sure is easier
> to just --amend the commit than to ask for a new patch to apply.
I still shouldn't have let that change sneak into the diff. I know
how it happened, I wanted to copy part of that line so I wiggled
it around in vi, copied it, then hit undo. I didn't undo back far
enough. Then I didn't read the diff closely enough before sending.
> Out of curiousity, how many other SCM's allow you to --amend a commit?
None that I know of.
--
Shawn.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-18 15:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18 2:08 [PATCH 1/2] Document the master@{n} reflog query syntax Shawn O. Pearce
2007-01-18 2:30 ` Jim Treadway
2007-01-18 2:50 ` Shawn O. Pearce
2007-01-18 10:33 ` Andreas Ericsson
2007-01-18 15:48 ` Shawn O. Pearce
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).