On 10/13/2015 04:39 AM, Michael Haggerty wrote:
> On 10/12/2015 11:51 PM, David Turner wrote:
>> is_branch was already non-static, but this patch declares it in the
>> header.
>>
>> Signed-off-by: Ronnie Sahlberg
>> Signed-off-by: David Turner
>> ---
>> [...]
>
> It seems odd that repack_without
Stefan Beller writes:
>> The parallel_process API could learn a new "verbose" feature that it
>> by itself shows some messages like
>>
>> "processing the 'frotz' job with N tasks"
>> "M tasks finished (N still running)"
>
> I know what to fill in for M and N, 'frotz' is a bit unclear to m
On 10/12/2015 11:51 PM, David Turner wrote:
> This function might be used by other refs backends
>
> Signed-off-by: David Turner
> ---
> refs.h | 11 +++
> 1 file changed, 11 insertions(+)
>
> diff --git a/refs.h b/refs.h
> index fc8a748..7a936e2 100644
> --- a/refs.h
> +++ b/refs.h
> @
evgeny litvinenko writes:
> Solaris has the following prototype in the file /usr/include/arpa/inet.h:
>
> extern const char *inet_ntop(int, const void *_RESTRICT_KYWD, char
> *_RESTRICT_KYWD, socklen_t);
>
> Git's prototype for inet_ntop is in file git-compat-util.h:
>
> #ifdef NO_INET_NTOP
> con
On 10/12/2015 11:51 PM, David Turner wrote:
> From: Ronnie Sahlberg
>
> Add ref backend methods for:
> resolve_ref_unsafe, verify_refname_available, pack_refs, peel_ref,
> create_symref, resolve_gitlink_ref.
>
> Signed-off-by: Ronnie Sahlberg
> Signed-off-by: David Turner
> ---
> builtin/init
On 10/12/2015 11:51 PM, David Turner wrote:
> From: Ronnie Sahlberg
>
> Add a ref structure for backend methods. Start by adding a method pointer
> for the transaction commit function.
>
> Add a function set_refs_backend to switch between backends. The files
> based backend is the default.
>
>
On 12/10/2015 22:21, Matthieu Moy wrote:
> Francois-Xavier Le Bail writes:
>
>> Hello,
>>
>> [I try some search engines without success, perhaps I have missed something].
>>
>> For example, if I rebase the following commits, I would want that if
>> the commit hash 222... become 777...,
On 10/13/2015 09:33 AM, Michael Haggerty wrote:
> On 10/12/2015 11:51 PM, David Turner wrote:
>> This function might be used by other refs backends
>>
>> Signed-off-by: David Turner
>> ---
>> refs.h | 11 +++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/refs.h b/refs.h
>> index
On 10/12/2015 11:51 PM, David Turner wrote:
> Rename copy_msg to copy_reflog_msg and make it public.
>
> Signed-off-by: David Turner
> ---
> refs-be-files.c | 28 +---
> refs.c | 26 ++
> refs.h | 2 ++
> 3 files changed, 29 inse
On 10/12/2015 11:51 PM, David Turner wrote:
> This function does not contain any backend specific code so we
> move it to the common code.
>
> Signed-off-by: David Turner
> ---
> refs-be-files.c | 53 -
> refs.c | 31 ++
On 10/12/2015 11:51 PM, David Turner wrote:
> Create new function verify_no_descendants, to hold one of the ref
> conflict checks used in verify_refname_available. Multiple backends
> will need this function, so it goes in the common code.
>
> Signed-off-by: David Turner
> ---
> refs-be-files.c
Le 11/10/2015 19:55, larsxschnei...@gmail.com a écrit :
> +
> +before_script: make
> +
> +script: make --quiet test
Travis can be used in container mode but that would need getting rid of
"sudo" command and only installing from white-listed sources
(https://github.com/travis-ci/apt-source-whitelis
I reviewed the patches up to here pretty carefully, and aside from the
comments I already sent, they look good.
I like the new approach where the ref_transaction-building code is
shared across backends.
It seems to me that a good breaking point for the first batch of patches
would be here, just b
On 10/09/2015 03:43 AM, brian m. carlson wrote:
> Convert several internal functions in refs.c to use struct object_id,
> and use the GIT_SHA1_HEXSZ constants in parse_ref_line.
>
> Signed-off-by: brian m. carlson
> [...]
I looked over this patch at the diff level and didn't find any problems.
Hi Junio,
On 2015-10-12 22:28, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
>>> I think the most sensible regression fix as the first step at this
>>> point is to call it as a separate process, just like the code calls
>>> "apply" as a separate process for each patch. Optimization can
On Tue, 13 Oct 2015 10:50:40 +0200
Francois-Xavier Le Bail wrote:
> >> For example, if I rebase the following commits, I would want that
> >> if the commit hash 222... become 777...,
> >> the message
> >> "Update test output for "
> >> become
> >> "
From: "Konstantin Khomoutov"
On Tue, 13 Oct 2015 10:50:40 +0200
Francois-Xavier Le Bail wrote:
>> For example, if I rebase the following commits, I would want that
>> if the commit hash 222... become 777...,
>> the message
>> "Update test output for 222
Hey there,
the book at https://git-scm.com/book/en/v2 (which is awesome btw,
thanks for that!), contains a lot of images that are inaccessible to me
because I am visually impaired. Not sure if they are really really
important, but in some cases it was a little bit complicated to follow
some
Hi Lucas,
On 2015-10-13 15:53, Lucas Radaelli wrote:
> the book at https://git-scm.com/book/en/v2 (which is awesome btw,
> thanks for that!), contains a lot of images that are inaccessible to
> me because I am visually impaired. Not sure if they are really really
> important, but in some cases
On Tue, Oct 13, 2015 at 12:32 AM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>>> The parallel_process API could learn a new "verbose" feature that it
>>> by itself shows some messages like
>>>
>>> "processing the 'frotz' job with N tasks"
>>> "M tasks finished (N still running)"
>>
>
Since @rev_list_opts contains everything that goes to the git format-patch
including an additional option like '--cover-letter' we might be interested to
compose it before send.
My often use case is to do:
% git format-patch --cover-letter --subject-prefix="PATCH vN"
rev1^..revXYZ
Karthik Nayak writes:
> Port branch.c to use ref-filter APIs for printing. This clears out
> most of the code used in branch.c for printing and replaces them with
> calls made to the ref-filter library.
>
> Introduce get_format() which gets the format required for printing of
> refs. Make amendme
On Tue, Oct 13, 2015 at 6:29 AM, Philip Oakley wrote:
> My tuppence is that the only sha1's that could/would be rewritten would be
> those for the commits within the rebase. During rebasing it is expected that
> the user is re-adjusting things for later upstream consumption, with social
> controls
On Tue, Oct 13, 2015 at 10:01 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Port branch.c to use ref-filter APIs for printing. This clears out
>> most of the code used in branch.c for printing and replaces them with
>> calls made to the ref-filter library.
>>
>> Introduce get_format() wh
On Tue, Oct 13, 2015 at 1:07 PM, Jacob Keller wrote:
> On Tue, Oct 13, 2015 at 6:29 AM, Philip Oakley wrote:
>> My tuppence is that the only sha1's that could/would be rewritten would be
>> those for the commits within the rebase. During rebasing it is expected that
>> the user is re-adjusting th
On Thu, Oct 8, 2015 at 2:48 PM, Karthik Nayak wrote:
> Add support for %(upstream:track,nobracket) which will print the
> tracking information without the brackets (i.e. "ahead N, behind M").
>
> Add test and documentation for the same.
> ---
> Documentation/git-for-each-ref.txt | 6 --
> re
On Tue, 2015-10-13 at 09:56 +0200, Michael Haggerty wrote:
> On 10/12/2015 11:51 PM, David Turner wrote:
> > From: Ronnie Sahlberg
> >
> > Add a ref structure for backend methods. Start by adding a method pointer
> > for the transaction commit function.
> >
> > Add a function set_refs_backend to
On Tue, 2015-10-13 at 11:18 +0200, Michael Haggerty wrote:
> On 10/13/2015 09:33 AM, Michael Haggerty wrote:
> > On 10/12/2015 11:51 PM, David Turner wrote:
> >> This function might be used by other refs backends
> >>
> >> Signed-off-by: David Turner
> >> ---
> >> refs.h | 11 +++
> >> 1
On Tue, 2015-10-13 at 12:25 +0200, Michael Haggerty wrote:
> On 10/12/2015 11:51 PM, David Turner wrote:
> > Create new function verify_no_descendants, to hold one of the ref
> > conflict checks used in verify_refname_available. Multiple backends
> > will need this function, so it goes in the comm
Karthik Nayak writes:
> On Thu, Oct 8, 2015 at 2:48 PM, Karthik Nayak wrote:
>> Add support for %(upstream:track,nobracket) which will print the
>> tracking information without the brackets (i.e. "ahead N, behind M").
>>
>> Add test and documentation for the same.
>> ---
>> Documentation/git-fo
Hi Junio,
On 10/13/15, Junio C Hamano wrote:
> evgeny litvinenko writes:
>
>> Solaris has the following prototype in the file /usr/include/arpa/inet.h:
>>
>> extern const char *inet_ntop(int, const void *_RESTRICT_KYWD, char
>> *_RESTRICT_KYWD, socklen_t);
>>
>> Git's prototype for inet_ntop is
Matthieu Moy writes:
>> If you see here, we detect "track" first for
>> %(upstream:track,nobracket)
>
> Yes, but I still think that this was a bad idea. If you want
> nobracket to apply to "track", then the syntax should be
> %(upstream:track=nobracket). I think the "nobracket" should apply
> to
On Mon, 2015-10-12 at 15:28 -0700, Junio C Hamano wrote:
> David Turner writes:
>
> > From: Keith McGuigan
> >
> > During merges, we would previously free entries that we no longer need
> > in the destination index. But those entries might also be stored in
> > the dir_entry cache, and when a l
From: "Mike Rappazzo"
On Tue, Oct 13, 2015 at 1:07 PM, Jacob Keller
wrote:
On Tue, Oct 13, 2015 at 6:29 AM, Philip Oakley
wrote:
My tuppence is that the only sha1's that could/would be rewritten would
be
those for the commits within the rebase. During rebasing it is expected
that
the user i
On Tue, 2015-10-13 at 05:41 +0200, Michael Haggerty wrote:
> If its removal was intentional, it deserves a careful explanation (and
> should probably be done as a separate commit). If it was an accident,
> please consider how this accident arose and try to think about whether
> similar accidents m
David Turner writes:
>> This one smelled iffy. I think it is safe because the caller does
>> not look at src[] other than src[0] after this function returns, and
>> this setting to NULL happens only when o->merge is set to 1, so I do
>> not think this is buggy, but at the same time I do not thin
Stefan Beller writes:
> Assuming we go with your second school of thought (N are the real
> running processes, M including the finished but still pending output tasks),
That's neither of my two, I would think.
Anyway, I think it is now clear that it not very easy to say "I know
what to fill in
Andy Shevchenko writes:
> My often use case is to do:
> % git format-patch --cover-letter --subject-prefix="PATCH vN"
> rev1^..revXYZ
> % $GIT_EDITOR -*
> % git send-email 00* # assumes series less than 100 patches
> % rm -f 00*
I guess this patch would not hurt too
On 10/13/2015 08:28 PM, David Turner wrote:
> On Tue, 2015-10-13 at 09:56 +0200, Michael Haggerty wrote:
>> On 10/12/2015 11:51 PM, David Turner wrote:
>>> [...]
>>> +extern struct ref_be refs_be_files;
>>
>> I don't think that refs_be_files is needed in the public interface.
>
> We use refs_be_lm
On Tue, 2015-10-13 at 09:23 +0200, Michael Haggerty wrote:
> On 10/13/2015 04:39 AM, Michael Haggerty wrote:
> > On 10/12/2015 11:51 PM, David Turner wrote:
> >> is_branch was already non-static, but this patch declares it in the
> >> header.
> >>
> >> Signed-off-by: Ronnie Sahlberg
> >> Signed-of
On Tue, Oct 13, 2015 at 12:24 PM, Philip Oakley wrote:
> IIUC (as an alternate example), in G4W one can submit a (long) pull request
> with internal back references that would be merged directly, so the sha1's
> could be updated as Francois-Xavier originally asked. I have a series that's
> been b
On Tue, 2015-10-13 at 13:29 +0200, Michael Haggerty wrote:
> I reviewed the patches up to here pretty carefully, and aside from the
> comments I already sent, they look good.
>
> I like the new approach where the ref_transaction-building code is
> shared across backends.
>
> It seems to me that a
hi,
- `git stash save -u` deletes a directory, even though the _contents_
of that directory are .gitignored (e.g. "foo/*" in .gitignore).
Detailed reproduction below.
- The behaviour is not present when instead .gitignoring the directory
itself (e.g. "foo"). This does imo not excuse the behaviour
On Tue, 2015-10-13 at 18:21 -0400, David Turner wrote:
> On Tue, 2015-10-13 at 13:29 +0200, Michael Haggerty wrote:
> > I reviewed the patches up to here pretty carefully, and aside from the
> > comments I already sent, they look good.
> >
> > I like the new approach where the ref_transaction-buil
From: "Jacob Keller"
On Tue, Oct 13, 2015 at 12:24 PM, Philip Oakley
wrote:
IIUC (as an alternate example), in G4W one can submit a (long) pull
request
with internal back references that would be merged directly, so the
sha1's
could be updated as Francois-Xavier originally asked. I have a ser
So here is an attempt to libify "git mailinfo" so that the built-in
version of "git am" does not have to run it via run_command()
interface. "git am", when fed an N-patch series, runs one
"mailsplit", N "mailinfo" and N "apply" all via run_command()
interface (plus 2 more "apply" and 1 "merge-recu
This requires us to pass "struct mailinfo" to more functions
throughout the codepath that read input lines, which makes
later steps easier.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 54 --
1 file changed, 28 insertions(+), 26 delet
The called function checks if the second parameter is either a NULL
or an empty string at the very beginning and returns without doing
anything. Remove the useless call.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/builtin/mailinfo
Some functions in this module accessed the global "struct strbuf
line" while many others used a strbuf passed as an argument.
Convert the former to ensure that nobody deeper in the callchains
relies on the global one.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 48
We pre-increment the pointer that we will use to store something at,
so the pointer is already beyond the end of the array if it points
at content[MAX_BOUNDARIES].
Signed-off-by: Junio C Hamano
---
As always, I am very bad at checking and fixing off-by-one errors.
A few extra sets of eyeballs
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 23 +--
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 35e1ab9..5302c03 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -20,6 +20,8 @@ struct maili
This requires us to pass the structure into check_header() codepath.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 30 --
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 163032e..35e1ab9 100644
---
Earlier we got rid of two function-scope static variables that kept
track of the states of helper functions by making them extra arguments
that are passed throughout the callchain. Now we have a convenient
place to store and pass them around in the form of "struct mailinfo",
change them into two f
Instead of dying in convert_to_utf8(), just report an error and let
the callers handle it. Between the two callers:
- decode_header() knows how to handle malformed line by reporting
the breakage to the caller, so let it follow the pattern it
already knows about;
- handle_commit_msg() doe
This one is trivial thanks to previous steps that started passing
the structure throughout the input codepaths.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 7e3976
This requires us to pass the struct down to decode_header() and
convert_to_utf8() callchain.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 40 +++-
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
The top-level mailinfo() would instead punt when the code in the
deeper part of the callchain detects an unrecoverable error in the
input.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 36 +---
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git
There is a strange "if (!cmitmsg) return 0" at the very beginning of
handle_commit_msg(), but the condition should never trigger,
because:
* The only place cmitmsg is set to NULL is after this function sees
a patch break, closes the FILE * to write the commit log message
and returns 1. Thi
When mailinfo() is eventually libified, the calling "git am" still
will have to write out the log message in the "msg" file for hooks
and other users of the information, but at least it does not have to
reopen and reread what was written back if the function kept it in a
strbuf so that the caller c
In olden days we might have wanted to behave differently in
decode_header() if the header line was encoded with RFC2047, but we
apparently do not do so, hence this helper function can go, together
with its return value.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 23 +++---
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 27 ++-
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 7e01efa..fbfa27e 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -23,14 +23,14 @@ struct
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index fbfa27e..a51b2c5 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -22,6 +22,7 @@ struct mailinfo {
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 45 ++---
1 file changed, 26 insertions(+), 19 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index d38d716..4b9b1cc 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -7,6
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 256d04a..b591a2f 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -7,11 +7,11 @@
#inclu
The decode_header() function tries to unwrap RFC2047-style quoted
strings but punts when it finds anything it cannot parse. Allow the
function to report if it punted to the caller, and use the resulting
string in the caller only when the function says it parsed the input
successfully.
Signed-off-
These two are the only easy ones that do not require passing the
structure around to deep corners of the callchain.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
in
This function wants to call find_boundary() and is called only from
one place without any recursing, so it becomes easier to read if it
appears after the called function.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 114 ++---
1 file chan
With this, the builtin "git am" can hopefully make an internal call
to the mailinfo() function without going through the run_command()
interface, whose overhead is heavyweight compared to what mailinfo()
itself does on some platforms.
Signed-off-by: Junio C Hamano
---
Makefile |1 +
The mailinfo() function is the only one that wants the "line_global"
to be directly touchable. Note that handle_body() has to be passed
this strbuf so that it sees the "first line of the input" after the
loop in this function processes the headers. It feels a bit dirty
that handle_body() then kee
Initially have only 'email' and 'name' fields in there and remove
the corresponding globals. In subsequent patches, more globals will
be moved to this and the structure will be passed around as a new
parameter to more functions.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 61
Two helper functions use "static int" in their scope to keep track
of the state while repeatedly getting called once for each input
line. Move these state variables their ultimate caller and pass
down pointers to them, as a small step in preparation for making
this entire callchain more reentrant.
Signed-off-by: Junio C Hamano
---
builtin/mailinfo.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index b591a2f..c9629c8 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -30,10 +30,10 @@ struc
Hi list,
In https://git-scm.com/docs/user-manual.html , all links to the
glossary[1] are broken.
I'm aware of a recent bug report about broken links ($gmane/279048/),
but that one seems unrelated to what I'm reporting.
[1] For example: https://git-scm.com/docs/user-manual.html#def_head
--
To uns
On Tue, 2015-10-13 at 05:41 +0200, Michael Haggerty wrote:
> The original read
>
> if (read_ref(pseudoref, actual_old_sha1))
> die("could not read ref '%s'", pseudoref);
>
> This seems like an important test. What happened to it?
>
> If its removal was intent
"git mailinfo" itself did not need this, as open file handles are
flushed and closed upon process exit, but the libified version needs
to clean up after itself when it is done.
Signed-off-by: Junio C Hamano
---
mailinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mailin
And finally the endgame. Instead of spawning "git mailinfo" via the
run_command() API the same number of times as there are incoming
patches, make direct internal call to the libified mailinfo() from
"git am" to reduce the spawning overhead, which would matter on some
platforms.
Signed-off-by: Ju
On Tue, Oct 13, 2015 at 01:43:30PM +0200, Michael Haggerty wrote:
> On 10/09/2015 03:43 AM, brian m. carlson wrote:
> > Convert several internal functions in refs.c to use struct object_id,
> > and use the GIT_SHA1_HEXSZ constants in parse_ref_line.
> >
> > Signed-off-by: brian m. carlson
> > [..
Wed, Oct 14, 2015 at 12:24 AM, Matthieu Moy
wrote:
> Yes, but I still think that this was a bad idea. If you want nobracket
> to apply to "track", then the syntax should be
> %(upstream:track=nobracket). I think the "nobracket" should apply to
> "upstream" (i.e. be global to the atom), hence
> %(
78 matches
Mail list logo