* [PATCH] Support tags in uncommit - use git_id instead of rev_parse
@ 2007-09-30 17:26 Pavel Roskin
2007-10-01 11:16 ` Karl Hasselström
2007-10-01 22:00 ` Catalin Marinas
0 siblings, 2 replies; 7+ messages in thread
From: Pavel Roskin @ 2007-09-30 17:26 UTC (permalink / raw)
To: Catalin Marinas, git
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
stgit/commands/uncommit.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/uncommit.py b/stgit/commands/uncommit.py
index 0cd0fb0..c22d3ea 100644
--- a/stgit/commands/uncommit.py
+++ b/stgit/commands/uncommit.py
@@ -65,7 +65,7 @@ def func(parser, options, args):
if len(args) != 0:
parser.error('cannot specify patch name with --to')
patch_nr = patchnames = None
- to_commit = git.rev_parse(options.to)
+ to_commit = git_id(options.to)
elif options.number:
if options.number <= 0:
parser.error('invalid value passed to --number')
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse
2007-09-30 17:26 [PATCH] Support tags in uncommit - use git_id instead of rev_parse Pavel Roskin
@ 2007-10-01 11:16 ` Karl Hasselström
2007-10-01 22:00 ` Catalin Marinas
1 sibling, 0 replies; 7+ messages in thread
From: Karl Hasselström @ 2007-10-01 11:16 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Catalin Marinas, git
Sounds like a good idea. Test? :-)
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse
2007-09-30 17:26 [PATCH] Support tags in uncommit - use git_id instead of rev_parse Pavel Roskin
2007-10-01 11:16 ` Karl Hasselström
@ 2007-10-01 22:00 ` Catalin Marinas
2007-10-02 22:03 ` Pavel Roskin
1 sibling, 1 reply; 7+ messages in thread
From: Catalin Marinas @ 2007-10-01 22:00 UTC (permalink / raw)
To: Pavel Roskin; +Cc: git
On 30/09/2007, Pavel Roskin <proski@gnu.org> wrote:
> Signed-off-by: Pavel Roskin <proski@gnu.org>
With this patch, uncommit can take patch names (with modifiers) as the
--to argument. When would this be needed?
To allow tags, maybe just pass something like
"git.rev_parse(options.to + '^{commit}')" or just modify git.rev_parse
to do it (and git_id to avoid it).
--
Catalin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse
2007-10-01 22:00 ` Catalin Marinas
@ 2007-10-02 22:03 ` Pavel Roskin
2007-10-03 20:35 ` Catalin Marinas
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2007-10-02 22:03 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
On Mon, 2007-10-01 at 23:00 +0100, Catalin Marinas wrote:
> On 30/09/2007, Pavel Roskin <proski@gnu.org> wrote:
> > Signed-off-by: Pavel Roskin <proski@gnu.org>
>
> With this patch, uncommit can take patch names (with modifiers) as the
> --to argument. When would this be needed?
Probably never.
> To allow tags, maybe just pass something like
> "git.rev_parse(options.to + '^{commit}')" or just modify git.rev_parse
> to do it (and git_id to avoid it).
I prefer to work with software that understands what I mean and tells me
that I cannot do it. It makes it easier to understand what is possible
and how the command is working.
Recognizing patch names in some commands but not others would be
annoying and inconsistent. Dumbing downs interactive software on
purpose is probably not worth the trouble.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse
2007-10-02 22:03 ` Pavel Roskin
@ 2007-10-03 20:35 ` Catalin Marinas
2007-10-03 21:44 ` Pavel Roskin
0 siblings, 1 reply; 7+ messages in thread
From: Catalin Marinas @ 2007-10-03 20:35 UTC (permalink / raw)
To: Pavel Roskin; +Cc: git
On 02/10/2007, Pavel Roskin <proski@gnu.org> wrote:
> On Mon, 2007-10-01 at 23:00 +0100, Catalin Marinas wrote:
> > To allow tags, maybe just pass something like
> > "git.rev_parse(options.to + '^{commit}')" or just modify git.rev_parse
> > to do it (and git_id to avoid it).
>
> I prefer to work with software that understands what I mean and tells me
> that I cannot do it. It makes it easier to understand what is possible
> and how the command is working.
>
> Recognizing patch names in some commands but not others would be
> annoying and inconsistent. Dumbing downs interactive software on
> purpose is probably not worth the trouble.
Without this patch, the 'stg uncommit -t patch' fails with 'Unknown
revision: patch'. With the patch applied, it still fails but with
'Commit ... does not have exactly one parent'. I don't say that the
first one is good but I don't think the latter is clearer. The 'stg
uncommit --help' states that the '--to' option takes a commit argument
but if one passes a patch name the error message gets pretty
confusing.
--
Catalin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse
2007-10-03 20:35 ` Catalin Marinas
@ 2007-10-03 21:44 ` Pavel Roskin
2007-10-07 21:06 ` Catalin Marinas
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2007-10-03 21:44 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
On Wed, 2007-10-03 at 21:35 +0100, Catalin Marinas wrote:
> Without this patch, the 'stg uncommit -t patch' fails with 'Unknown
> revision: patch'. With the patch applied, it still fails but with
> 'Commit ... does not have exactly one parent'. I don't say that the
> first one is good but I don't think the latter is clearer. The 'stg
> uncommit --help' states that the '--to' option takes a commit argument
> but if one passes a patch name the error message gets pretty
> confusing.
Actually, 'Commit ... does not have exactly one parent' means that stg
misinterpreted the patch name as some non-existing hash and started
iterating back until it hit the first merge.
Perhaps stgit should make sure that the hash is valid before walking the
commit tree. If it's not, stgit could provide a better message.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse
2007-10-03 21:44 ` Pavel Roskin
@ 2007-10-07 21:06 ` Catalin Marinas
0 siblings, 0 replies; 7+ messages in thread
From: Catalin Marinas @ 2007-10-07 21:06 UTC (permalink / raw)
To: Pavel Roskin; +Cc: git
On 03/10/2007, Pavel Roskin <proski@gnu.org> wrote:
> On Wed, 2007-10-03 at 21:35 +0100, Catalin Marinas wrote:
>
> > Without this patch, the 'stg uncommit -t patch' fails with 'Unknown
> > revision: patch'. With the patch applied, it still fails but with
> > 'Commit ... does not have exactly one parent'. I don't say that the
> > first one is good but I don't think the latter is clearer. The 'stg
> > uncommit --help' states that the '--to' option takes a commit argument
> > but if one passes a patch name the error message gets pretty
> > confusing.
>
> Actually, 'Commit ... does not have exactly one parent' means that stg
> misinterpreted the patch name as some non-existing hash and started
> iterating back until it hit the first merge.
>
> Perhaps stgit should make sure that the hash is valid before walking the
> commit tree. If it's not, stgit could provide a better message.
OK, I applied your patch but I'll have to look into the error message
to make it more meaningful. Thanks.
--
Catalin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-07 21:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-30 17:26 [PATCH] Support tags in uncommit - use git_id instead of rev_parse Pavel Roskin
2007-10-01 11:16 ` Karl Hasselström
2007-10-01 22:00 ` Catalin Marinas
2007-10-02 22:03 ` Pavel Roskin
2007-10-03 20:35 ` Catalin Marinas
2007-10-03 21:44 ` Pavel Roskin
2007-10-07 21:06 ` Catalin Marinas
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).