On Thu, Jul 30, 2015 at 12:49 AM, Eric Sunshine sunsh...@sunshineco.com wrote:
On Tuesday, July 28, 2015, Karthik Nayak karthik@gmail.com wrote:
Introduce 'ref_formatting' structure to hold values of pseudo atoms
which help only in formatting. This will eventually be used by atoms
like
On Thu, Jul 30, 2015 at 1:24 AM, Junio C Hamano gits...@pobox.com wrote:
Actually, I think it is wrong to have this function in the first
place. It is a sign that the caller is doing too little before
calling this function.
If the act of printing an atom uses the formatting state that says
Junio C Hamano gits...@pobox.com writes:
If the act of printing an atom uses the formatting state that says
next one needs X, then it is responsible to clear that next one
needs X part of the state, as it is the one who consumed that
state. E.g. if it used to say next one needs to be padded
On Tue, Jul 28, 2015 at 12:56 PM, Matthieu Moy
matthieu@grenoble-inp.fr wrote:
Karthik Nayak karthik@gmail.com writes:
-static void print_value(struct atom_value *v, int quote_style)
+static void apply_formatting_state(struct ref_formatting_state *state,
+
Karthik Nayak karthik@gmail.com writes:
Ah, I hate making grammatical errors, Even though I check it always gets away.
Anyways waiting for Junio and others to reply on this version. Could do a
resend
for this series if needed.
If you took all my remarks into account, I think it's worth
Eric Sunshine sunsh...@sunshineco.com writes:
@@ -1254,9 +1273,26 @@ static void emit(const char *cp, const char *ep)
+static void reset_formatting_state(struct ref_formatting_state *state)
+{
+ int quote_style = state-quote_style;
+ memset(state, 0, sizeof(*state));
+
Eric Sunshine sunsh...@sunshineco.com writes:
@@ -1254,9 +1273,26 @@ static void emit(const char *cp, const char *ep)
+static void reset_formatting_state(struct ref_formatting_state *state)
+{
+ int quote_style = state-quote_style;
+ memset(state, 0, sizeof(*state));
+
Eric Sunshine sunsh...@sunshineco.com writes:
@@ -1254,9 +1273,26 @@ static void emit(const char *cp, const char *ep)
+static void reset_formatting_state(struct ref_formatting_state *state)
+{
+ int quote_style = state-quote_style;
+ memset(state, 0, sizeof(*state));
+
On Tuesday, July 28, 2015, Karthik Nayak karthik@gmail.com wrote:
Introduce 'ref_formatting' structure to hold values of pseudo atoms
which help only in formatting. This will eventually be used by atoms
like `color` and the `padright` atom which will be introduced in a
later patch.
Isn't
Karthik Nayak karthik@gmail.com writes:
-static void print_value(struct atom_value *v, int quote_style)
+static void apply_formatting_state(struct ref_formatting_state *state,
+struct atom_value *v, struct strbuf *value)
{
- struct strbuf sb =
Introduce 'ref_formatting' structure to hold values of pseudo atoms
which help only in formatting. This will eventually be used by atoms
like `color` and the `padright` atom which will be introduced in a
later patch.
Helped-by: Junio C Hamano gits...@pobox.com
Mentored-by: Christian Couder
11 matches
Mail list logo