From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Git List <git@vger.kernel.org>,
Christian Couder <chriscool@tuxfamily.org>,
Daniel Barkalow <barkalow@iabervon.org>
Subject: Re: [RFC PATCH 00/11] Sequencer Foundations
Date: Mon, 11 Apr 2011 14:37:49 +0530 [thread overview]
Message-ID: <20110411090747.GD28959@kytes> (raw)
In-Reply-To: <20110410194739.GC28163@elie>
Hi Jonathan,
Jonathan Nieder writes:
> Ramkumar Ramachandra wrote:
> > 0. Is the general flow alright?
>
> Not sure --- I don't have the big picture. Could you give a quick
> summary of the flow in the cover letter ("patch 1 does such-and-such,
> so patch 2 can do such-and-such, leading to...") to the next revision,
> and quick explanations of the purpose (i.e., why we should want each
> change) in the individual change descriptions?
Agreed. I'll ask again after the next re-roll.
> > 1. Is it okay to use this kind of adaptive error handling (calling
> > 'die' in some places and returning error in other places), or should
> > it be more uniform?
>
> 'die' gets used in two ways (well, one way really):
>
> - to say "there is no sane way to recover from this failure". For
> example, xmalloc dies if even after trying to free up memory,
> malloc still could not satisfy the request.
>
> - to say "so far we've been too lazy to implement recovery from
> this failure". Or "while we *could* recover from this failure, no
> one has needed it, so let's not --- that code would just bitrot."
>
> Therefore a mixture of 'die' and 'return error' seems inevitable. The
> dangerous mixtures to avoid are those likely to trip up callers (e.g.,
> if all code paths 'return error' except one edge case).
My thoughts precisely. I was worried about what would happen in
future when Git is completely lib'ified, but I suppose it makes little
sense to think about that now.
> > 2. In 11/11, I've used cmd_revert and cmd_rerere. This is highly
> > inelegant, mainly because of the command-line argument parsing
> > overhead. Re-implementing it using more low-level functions doesn't
> > seem to be the way to go either: for example, 'reset --hard' has some
> > additional logic of writing HEAD and ORIG_HEAD, which I don't want to
> > duplicate. Should I work on reworking parts of 'rerere.c' and
> > 'revert.c', or is there some other way?
>
> See "git log --grep=libify" for examples. Isn't rerere already
> libified? Ah, you need "rerere clear" --- I think a rerere_clear
> function alongside rerere_forget et al would make sense.
Done in [1].
> More generally, it should be feasible to expose a nice, simple API for
> any functionality you need (with params struct if necessary, etc).
> That's how many of the current APIs (revision walking, diffcore, ...)
> came about.
I see. Okay, I'll see if it makes sense to craft an API for rebase.
> > 3. From the format of the TODO and DONE files, one more thing should
> > be clear- I'm trying to stick to a slight variation of the 'rebase -i'
> > format. This part will go into the sequencer. Then I'll use a
> > cherry-pick specific file to keep the command-line options. Yes, I'm
> > trying to work on Daniel's idea [3] from the very start. Is this a
> > good idea?
>
> This is still bouncing in my head. I think I like it --- is the idea
> that some day you could put commands like
>
> am topic.mbox
>
> in your insn sheet, or do nested rebases with a --force-nested option?
> That does sound useful. How would one request "skip to the next
> operation in the outer rebase" on the command line? This is starting
> to feel like a debugger.
I'll respond to this later in the thread, since Daniel has already
said something. I just need help with crafting a nice instruction
sheet now -- please join the discussion at [2].
> > 4. I have a feeling that I've broken translation strings. Is there a
> > README, plus a bunch of tests I can run to make sure that I've not
> > broken anything?
>
> If you put "GETTEXT_POISON = YesPlease" in your config.mak, the
> translations will be translated to gibberish when the GIT_GETTEXT_POISON
> envvar is set, so you can use the test suite as a sanity check.
> "make pot" can be used to get the translation template that
> translators will see.
>
> As for a readme explaining how to use _, N_, and Q_, yes, I think that
> would be useful. I think Ævar's series has something like that (but
> targetted at translators) later on; it might make sense to prod him or
> me for a simpler explanation can be merged immediately. Until then,
> there is "git log gettext.h".
Thanks! Someone should really document this whole translations thing.
-- Ram
[1]: http://article.gmane.org/gmane.comp.version-control.git/171314
[2]: http://thread.gmane.org/gmane.comp.version-control.git/171255/focus=171307
next prev parent reply other threads:[~2011-04-11 9:08 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 15:11 [RFC PATCH 00/11] Sequencer Foundations Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 01/11] revert: Avoid calling die; return error instead Ramkumar Ramachandra
2011-04-10 19:14 ` Jonathan Nieder
2011-05-08 12:04 ` Ramkumar Ramachandra
2011-04-11 20:26 ` Junio C Hamano
2011-04-10 15:11 ` [PATCH 02/11] revert: Lose global variables "commit" and "me" Ramkumar Ramachandra
2011-04-11 3:24 ` Christian Couder
2011-04-11 8:57 ` Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 03/11] revert: Introduce a struct to parse command-line options into Ramkumar Ramachandra
2011-04-10 19:21 ` Jonathan Nieder
2011-05-08 12:18 ` Ramkumar Ramachandra
2011-04-11 21:41 ` Junio C Hamano
2011-05-08 12:09 ` Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 04/11] revert: Separate cmdline argument handling from the functional code Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 05/11] revert: Catch incompatible command-line options early Ramkumar Ramachandra
2011-04-11 21:44 ` Junio C Hamano
2011-05-08 11:47 ` Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 06/11] revert: Implement parsing --continue, --abort and --skip Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 07/11] revert: Handle conflict resolutions more elegantly Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 08/11] usage: Introduce error_errno correspoding to die_errno Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 09/11] revert: Write head, todo, done files Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 10/11] revert: Give noop a default value while argument parsing Ramkumar Ramachandra
2011-04-10 15:11 ` [PATCH 11/11] revert: Implement --abort processing Ramkumar Ramachandra
2011-04-10 19:33 ` [RFC PATCH 00/11] Sequencer Foundations Daniel Barkalow
2011-04-11 8:55 ` Ramkumar Ramachandra
2011-04-10 19:47 ` Jonathan Nieder
2011-04-11 1:16 ` Daniel Barkalow
2011-04-11 6:42 ` Jonathan Nieder
2011-04-11 9:07 ` Ramkumar Ramachandra [this message]
2011-04-11 3:18 ` Christian Couder
2011-04-11 4:49 ` Ramkumar Ramachandra
2011-04-11 6:20 ` Christian Couder
2011-04-11 10:48 ` Ramkumar Ramachandra
2011-04-11 5:30 ` Daniel Barkalow
2011-04-11 5:38 ` Jonathan Nieder
2011-04-11 6:34 ` Daniel Barkalow
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=20110411090747.GD28959@kytes \
--to=artagnon@gmail.com \
--cc=barkalow@iabervon.org \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=jrnieder@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 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.