From: Michael Haggerty
> On 05/18/2014 08:29 PM, Christian Couder wrote:
>> The usage string for this option is:
>>
>> git replace [-f] --graft [...]
>>
>> First we create a new commit that is the same as
>> except that its parents are [...]
>>
>> Then we create a replace ref that replace w
Junio,
On Thu, May 22, 2014 at 01:52:45PM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
...
>
> Something like:
>
> To countermand the configuration variable for a specific run:
>
> $ git format-patch -1 --signature="This time only"
> $ git format-patch -1 --signat
Signed-off-by: Christian Couder
---
t/t6050-replace.sh | 12
1 file changed, 12 insertions(+)
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
index 68b3cb2..ca45a84 100755
--- a/t/t6050-replace.sh
+++ b/t/t6050-replace.sh
@@ -351,4 +351,16 @@ test_expect_success 'replace ref cl
Signed-off-by: Christian Couder
---
Documentation/git-replace.txt | 8
1 file changed, 8 insertions(+)
diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt
index 61461b9..491875e 100644
--- a/Documentation/git-replace.txt
+++ b/Documentation/git-replace.txt
@@ -10,
The usage string for this option is:
git replace [-f] --graft [...]
First we create a new commit that is the same as
except that its parents are [...]
Then we create a replace ref that replace with
the commit we just created.
With this new option, it should be straightforward to
convert graf
Here is a small patch series to implement:
git replace [-f] --graft [...]
The changes since the RFC/PATCH are the following:
- in patch 1/3, parse_commit_buffer() is now used to
make sure is not corrupt
- patch 2/3 add some tests
- patch 3/3 add some documentation
About the document
On Thu, May 22, 2014 at 4:11 PM, Pasha Bolokhov
wrote:
> diff --git a/t/t2205-add-gitdir.sh b/t/t2205-add-gitdir.sh
> new file mode 100755
> index 000..3c6b853
> --- /dev/null
> +++ b/t/t2205-add-gitdir.sh
> @@ -0,0 +1,61 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2014 Pasha Bolokhov
> +#
> +
> +
On Thu, May 22, 2014 at 05:36:12AM -0400, Jeff King wrote:
> If we do want to do magic like "latin1 is really iso-8859-1", that seems
> like the domain of iconv to me. If iconv doesn't handle it itself, I'd
> rather have a wrapper there. Putting it at that layer keeps the code
> cleaner, and it mea
--
Compliment of the day,
I am Mrs. Jiang Ming, a staff of Lloyds TSB Group Plc. here in
Hong Kong attached with Private Banking Services;I have a secured business
proposal for you. Should you be interested please reach me on my private
emailaddress (mrsjiangming1...@outlook.com) And after tha
John Keeping writes:
> The options added to __git_merge_options are those that git-pull also
> understands, since that variable is used by both commands. Those added
> directly in _git_merge() are specific to git-merge and are not
> supported by git-pull.
Interesting.
Technically, "are not pas
Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>> I hate rename_ref :-)
>>
>> I have reworked the transaction code to special case the deletion of
>> the old ref for n/n -> n and n -> n/n renames
>> so that we can carefully avoid n/n.lock files to exist or prevent the
>> directory <-> file trans
Ronnie Sahlberg wrote:
> I hate rename_ref :-)
>
> I have reworked the transaction code to special case the deletion of
> the old ref for n/n -> n and n -> n/n renames
> so that we can carefully avoid n/n.lock files to exist or prevent the
> directory <-> file transition for n during these rename
Elia Pinto writes:
> I have no problems rerolling this simple patch, but i need to know
> what is the (git) right style in this case.
If I were doing this...
diff --git a/contrib/subtree/t/t7900-subtree.sh
b/contrib/subtree/t/t7900-subtree.sh
index 66ce4b0..c1d0b23 100755
--- a/contrib/subtre
On Fri, 2014-05-23 at 06:33 +0700, Duy Nguyen wrote:
> On Fri, May 23, 2014 at 5:18 AM, Junio C Hamano wrote:
> > ... and the "incrementally repair" Peff talks about would be to
> > cover more cases where we may know (either because we have already
> > computed it to write out a subtree, or we hav
On Fri, May 23, 2014 at 5:18 AM, Junio C Hamano wrote:
> ... and the "incrementally repair" Peff talks about would be to
> cover more cases where we may know (either because we have already
> computed it to write out a subtree, or we have just read from a
> known tree to populate a part of the ind
On May 22, 2014, at 06:42, Jeff King wrote:
[re-adding list cc]
On Thu, May 22, 2014 at 03:16:45PM +0200, Christian Couder wrote:
+void strbuf_tolower(struct strbuf *sb)
+{
+ char *p;
+ for (p = sb->buf; *p; p++)
+ *p = tolower(*p);
+}
Last time I tried a change li
David Turner writes:
> ... I still believe that the cache-tree behavior would be
> suboptimal, ...
I do not think anybody doubts that "suboptimal"-ness in this thread.
As you saw the "incremental" thing from Peff and my responses to it,
there may be more things we could be doing. It just has no
Ronnie Sahlberg wrote:
> This patch series can also be found at
> https://github.com/rsahlberg/git/tree/ref-transactions
Continuing with the review of 65a1cb7b (2014-05-22 12:08):
11/40 change ref_transaction_update() to do error checking and return status
The "there will be in the future" sou
On Thu, 2014-05-22 at 15:29 -0700, Junio C Hamano wrote:
> Junio C Hamano writes:
>
> > But at least my understanding has been that "git commit" (no partial
> > commit, write the whole index as a commit) which uses the "git
> > write-tree" machinery knows which subtree has what tree object name
>
I hate rename_ref :-)
I have reworked the transaction code to special case the deletion of
the old ref for n/n -> n and n -> n/n renames
so that we can carefully avoid n/n.lock files to exist or prevent the
directory <-> file transition for n during these renames.
This should allow us to have r
On May 22, 2014, at 02:29, Jeff King wrote:
When we get a content-type from curl, we get the whole
header line, including any parameters, and without any
normalization (like downcasing or whitespace) applied.
If we later try to match it with strcmp() or even
strcasecmp(), we may get false negat
On May 22, 2014, at 11:41, Jeff King wrote:
On Thu, May 22, 2014 at 11:36:37AM -0700, Junio C Hamano wrote:
Yes, and that would be fine with me (I actually wrote
strbuf_tolower for
my own use, and _then_ realized that we already had such a thing
that
could be replaced).
Do we forbid that
Junio C Hamano writes:
> But at least my understanding has been that "git commit" (no partial
> commit, write the whole index as a commit) which uses the "git
> write-tree" machinery knows which subtree has what tree object name
> and populates the cache-tree fully.
Here is what I tried just now
Junio C Hamano writes:
> David Turner writes:
>
>>> Yes. As I said, that should not usually be a problem for those who
>>> do the real work (read: commit), at which time write-tree will fully
>>> populate the cache-tree.
>>
>> Git commit does not in fact populate the cache-tree.
>
> If that is
David Turner writes:
>> Yes. As I said, that should not usually be a problem for those who
>> do the real work (read: commit), at which time write-tree will fully
>> populate the cache-tree.
>
> Git commit does not in fact populate the cache-tree.
If that is the case, we must have broken the wr
Ronnie Sahlberg wrote:
> This patch series can also be found at
> https://github.com/rsahlberg/git/tree/ref-transactions
Thoughts on 65a1cb7b (2014-05-22 12:08):
04/40 add a strbuf argument to ref_transaction_commit for error logging
Ideally this would come after the functions it calls so the
On Thu, 2014-05-22 at 14:58 -0700, Junio C Hamano wrote:
> David Turner writes:
>
> > On Thu, 2014-05-22 at 14:34 -0700, Junio C Hamano wrote:
> >> Jeff King writes:
> >>
> >> > [+cc Junio for cache-tree expertise]
> >> > ...
> >> > We never call reset_index now, because we handle it via diff.
David Turner writes:
> On Thu, 2014-05-22 at 14:34 -0700, Junio C Hamano wrote:
>> Jeff King writes:
>>
>> > [+cc Junio for cache-tree expertise]
>> > ...
>> > We never call reset_index now, because we handle it via diff. We could
>> > call prime_cache_tree in this case, but I'm not sure if th
On Thu, 2014-05-22 at 14:34 -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > [+cc Junio for cache-tree expertise]
> > ...
> > We never call reset_index now, because we handle it via diff. We could
> > call prime_cache_tree in this case, but I'm not sure if that is a good
> > idea, because
Jeff King writes:
> [+cc Junio for cache-tree expertise]
> ...
> We never call reset_index now, because we handle it via diff. We could
> call prime_cache_tree in this case, but I'm not sure if that is a good
> idea, because it primes it from scratch (and so it opens up all those
> trees that we
Jeff King writes:
>> > Yes, and that would be fine with me (I actually wrote strbuf_tolower for
>> > my own use, and _then_ realized that we already had such a thing that
>> > could be replaced).
>> ...
> ... I think
> the bigger question is: is this refactor worth doing, since there is
> only on
Jeremiah Mahler writes:
> Added option that allows a signature file to be used with format-patch
> so that signatures with newlines and other special characters can be
> easily included.
s/Added option/Add an option/. I do not think "with newlines and
other special characters" is the primary is
When an explicit '--git-dir' option points to a directory inside
the work tree, git treats it as if it were any other directory.
In particular, 'git status' lists it as untracked, while 'git add -A'
stages the metadata directory entirely
Add GIT_DIR to the list of excludes in setup_standard_exclud
Ronnie Sahlberg wrote:
> This patch series can also be found at
> https://github.com/rsahlberg/git/tree/ref-transactions
Thoughts on 65a1cb7b (2014-05-22 12:08):
01/40 remove ref_transaction_rollback
Reviewed-by: Jonathan Nieder
02/40 constify the sha arguments for ref_transaction_create|de
Ronnie Sahlberg wrote:
> This version completes the work to convert all ref updates to use
> transactions.
Finally got through this. It had thorny bits but generally goes in a
very good direction. Thanks for a pleasant read.
Feel free to send another iteration if you'd like review for the new
Junio,
On Thu, May 22, 2014 at 12:00:39PM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
> > I just notice that my patch is in 'pu'.
> > But it is version 7 instead of the improved version 8.
>
> Yeah, I know. In a distributed environment, multiple people work
> independently and a s
[+cc Junio for cache-tree expertise]
On Thu, May 22, 2014 at 03:09:59PM -0400, Jeff King wrote:
> > > does show some improvement. Perhaps "git reset" is not writing out the
> > > cache-tree extension?
> [...]
>
> Possibly. There is a call to prime_cache_tree in builtin/reset.c, which
> looks lik
Ronnie Sahlberg wrote:
> --- a/refs.c
> +++ b/refs.c
> @@ -798,11 +798,19 @@ struct name_conflict_cb {
> const char *refname;
> const char *oldrefname;
> const char *conflicting_refname;
> + const char **skip;
> + int skipnum;
Would a struct string_list make sense here?
On Thu, 2014-05-22 at 14:23 -0400, Jeff King wrote:
> On Thu, May 22, 2014 at 02:08:16PM -0400, David Turner wrote:
>
> > On Thu, 2014-05-22 at 12:46 -0400, Jeff King wrote:
> > > On Thu, May 22, 2014 at 12:22:43PM -0400, David Turner wrote:
> > >
> > > > If I have a git repository with a clean wo
On Thu, May 22, 2014 at 11:17 AM, Jonathan Nieder wrote:
> Hi,
>
> Ronnie Sahlberg wrote:
>
>> Add a new flag REF_ISPACKONLY that we can use in ref_transaction_delete.
>> This flag indicates that the ref does not exist as a loose ref andf only as
>> a packed ref. If this is the case we then change
On Thu, May 22, 2014 at 03:07:49PM -0400, David Turner wrote:
> On Thu, 2014-05-22 at 14:39 -0400, Jeff King wrote:
> > does show some improvement. Perhaps "git reset" is not writing out the
> > cache-tree extension?
>
> Yes, that seems to be exactly what is going on; the two indexes are
> ident
On Thu, 2014-05-22 at 14:39 -0400, Jeff King wrote:
> does show some improvement. Perhaps "git reset" is not writing out the
> cache-tree extension?
Yes, that seems to be exactly what is going on; the two indexes are
identical up to the point where the TREE extension appears.
Thanks for clearing
Jeremiah Mahler writes:
> I just notice that my patch is in 'pu'.
> But it is version 7 instead of the improved version 8.
Yeah, I know. In a distributed environment, multiple people work
independently and a sequence of event can go like this:
- I read v7, comment, and queue it only so that I
On Thu, May 22, 2014 at 11:36:37AM -0700, Junio C Hamano wrote:
> > Yes, and that would be fine with me (I actually wrote strbuf_tolower for
> > my own use, and _then_ realized that we already had such a thing that
> > could be replaced).
>
> Do we forbid that sb->buf[x] for some x < sb->len to b
On Thu, May 22, 2014 at 02:17:22PM -0400, David Turner wrote:
> In fact, git status does not write the index (at least in this context).
> And what is slow is not (only) checking over the working tree, but
> reading the packs. There should be no need to read files from the ODB
> at all, since the
Jeff King writes:
> On Wed, May 21, 2014 at 05:07:36PM -0700, Kyle J. McKay wrote:
>
>> >+void strbuf_tolower(struct strbuf *sb)
>> >+{
>> >+ size_t i;
>> >+ for (i = 0; i < sb->len; i++)
>> >+ sb->buf[i] = tolower(sb->buf[i]);
>> >+}
>> >+
>>
>> Wouldn't a direct transfer of the l
On Thu, May 22, 2014 at 02:08:16PM -0400, David Turner wrote:
> On Thu, 2014-05-22 at 12:46 -0400, Jeff King wrote:
> > On Thu, May 22, 2014 at 12:22:43PM -0400, David Turner wrote:
> >
> > > If I have a git repository with a clean working tree, and I delete the
> > > index, then I can use git res
On Thu, 2014-05-22 at 09:46 -0700, Elijah Newren wrote:
> On Thu, May 22, 2014 at 9:22 AM, David Turner
> wrote:
> > If I have a git repository with a clean working tree, and I delete the
> > index, then I can use git reset (with no arguments) to recreate it.
> > However, when I do recreate it, i
Hi,
Ronnie Sahlberg wrote:
> Add a new flag REF_ISPACKONLY that we can use in ref_transaction_delete.
> This flag indicates that the ref does not exist as a loose ref andf only as
> a packed ref. If this is the case we then change the commit code so that
> we skip taking out a lock file and we sk
On Thu, 2014-05-22 at 12:46 -0400, Jeff King wrote:
> On Thu, May 22, 2014 at 12:22:43PM -0400, David Turner wrote:
>
> > If I have a git repository with a clean working tree, and I delete the
> > index, then I can use git reset (with no arguments) to recreate it.
> > However, when I do recreate i
On Thu, May 22, 2014 at 10:51 AM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>> On Wed, May 21, 2014 at 4:57 PM, Jonathan Nieder wrote:
>>> Ronnie Sahlberg wrote:
>
This means that most loose refs will no longer be present after the rename
>>>
>>> Is this to handle the "git branch -m fo
On Thu, May 22, 2014 at 10:44 AM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>> On Wed, May 21, 2014 at 6:42 PM, Jonathan Nieder wrote:
>
>>> $ git rev-parse HEAD >.git/refs/heads/foo..bar
>>> $ git branch -m foo..bar something-saner
>>> fatal: Invalid branch name: 'f
Ronnie Sahlberg wrote:
> Signed-off-by: Ronnie Sahlberg
> ---
> refs.c | 12 ++--
> 1 file changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Jonathan Nieder
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More
Ronnie Sahlberg wrote:
> On Wed, May 21, 2014 at 4:57 PM, Jonathan Nieder wrote:
>> Ronnie Sahlberg wrote:
>>> This means that most loose refs will no longer be present after the rename
>>
>> Is this to handle the "git branch -m foo/bar foo" case or for some other
>> purpose?
>
> Yes. That is the
Ronnie Sahlberg wrote:
> On Wed, May 21, 2014 at 6:42 PM, Jonathan Nieder wrote:
>> $ git rev-parse HEAD >.git/refs/heads/foo..bar
>> $ git branch -m foo..bar something-saner
>> fatal: Invalid branch name: 'foo..bar'
>>
>> "git branch -m" has an explicit codepath ("recover
On Wed, May 21, 2014 at 6:42 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>> --- a/refs.c
>> +++ b/refs.c
>> @@ -2044,6 +2044,9 @@ static struct ref_lock *lock_ref_sha1_basic(const char
>> *refname,
>> int missing = 0;
>> int attempts_remaining = 3;
>>
>> + if (check_refnam
On Wed, May 21, 2014 at 3:22 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> Please pull my ref-transactions branch.
>
> I'm at bd5736cb (2014-05-21 13:46) now.
>
>> On Wed, May 21, 2014 at 3:00 PM, Jonathan Nieder wrote:
>>> Ronnie Sahlberg wrote:
>
--- a/refs.c
+++ b/refs.c
>
Added a comment that any flags >=0x100 are reserved for internal use.
On Wed, May 21, 2014 at 4:01 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> Change prune_ref to delete the ref using a ref transaction. To do this we
>> also
>> need to add a new flag REF_ISPRUNING that will tell th
On Wed, May 21, 2014 at 3:07 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> +++ b/refs.c
> [...]
>> @@ -3518,14 +3499,16 @@ int ref_transaction_commit(struct ref_transaction
>> *transaction,
>> struct ref_update *update = updates[i];
>>
>> if (!is_null_sha1(u
On Thu, May 22, 2014 at 9:22 AM, David Turner wrote:
> If I have a git repository with a clean working tree, and I delete the
> index, then I can use git reset (with no arguments) to recreate it.
> However, when I do recreate it, it doesn't come back the same. I have
> not analyzed this in detail
On Thu, May 22, 2014 at 12:22:43PM -0400, David Turner wrote:
> If I have a git repository with a clean working tree, and I delete the
> index, then I can use git reset (with no arguments) to recreate it.
> However, when I do recreate it, it doesn't come back the same. I have
> not analyzed this
On Tue, 2014-05-13 at 18:15 +0700, Nguyễn Thái Ngọc Duy wrote:
> + if (run_command(&cp))
> + warning(_("failed to start read-cache--daemon: %s"),
> + strerror(errno));
errno is not always (ever?) set, so if read-cache--daemon is missing,
On Thu, May 22, 2014 at 8:32 AM, Ronnie Sahlberg wrote:
> On Wed, May 21, 2014 at 4:22 PM, Jonathan Nieder wrote:
>> Ronnie Sahlberg wrote:
>>
>>> --- a/refs.c
>>> +++ b/refs.c
>> [...]
>>> @@ -2515,24 +2510,18 @@ static int delete_ref_loose(struct ref_lock *lock,
>>> int flag, struct strbuf *er
If I have a git repository with a clean working tree, and I delete the
index, then I can use git reset (with no arguments) to recreate it.
However, when I do recreate it, it doesn't come back the same. I have
not analyzed this in detail, but the effect is that commands like git
status take much lo
On Wed, May 21, 2014 at 4:57 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> This means that most loose refs will no longer be present after the rename
>
> Is this to handle the "git branch -m foo/bar foo" case or for some other
> purpose?
Yes. That is the main reason.
>
> [...]
>> ---
On Wed, May 21, 2014 at 4:47 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> Change the reference transactions so that we pass the reflog message
>> through to the create/delete/update function instead of the commit message.
>
> Nice.
>
> [...]
>> --- a/builtin/fetch.c
>> +++ b/builtin/fe
On Wed, May 21, 2014 at 4:22 PM, Jonathan Nieder wrote:
> Ronnie Sahlberg wrote:
>
>> --- a/refs.c
>> +++ b/refs.c
> [...]
>> @@ -2515,24 +2510,18 @@ static int delete_ref_loose(struct ref_lock *lock,
>> int flag, struct strbuf *err)
>>
>> int delete_ref(const char *refname, const unsigned char
Johannes Sixt writes:
> Am 5/22/2014 15:19, schrieb David Kastrup:
>> Torsten Bögershausen writes:
>>
>>> On 2014-05-22 14.48, Elia Pinto wrote:
Found by check-non-portable-shell.pl
>>>
>>> Thanks for picking this up
-export TEST_DIRECTORY=$(pwd)/../../../t
+TEST_DIRECTORY=$(pwd)
Am 5/22/2014 15:19, schrieb David Kastrup:
> Torsten Bögershausen writes:
>
>> On 2014-05-22 14.48, Elia Pinto wrote:
>>> Found by check-non-portable-shell.pl
>>
>> Thanks for picking this up
>>> -export TEST_DIRECTORY=$(pwd)/../../../t
>>> +TEST_DIRECTORY=$(pwd)/../../../t && export TEST_DIRECTO
Junio,
On Wed, May 21, 2014 at 06:53:07PM -0700, Jeremiah Mahler wrote:
> v8 of patch to add format-patch --signature-file option.
>
...
>
I just notice that my patch is in 'pu'.
But it is version 7 instead of the improved version 8.
--
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jm
The options added to __git_merge_options are those that git-pull also
understands, since that variable is used by both commands. Those added
directly in _git_merge() are specific to git-merge and are not
supported by git-pull.
Reported-by: Haralan Dobrev
Signed-off-by: John Keeping
---
contrib
This should avoid future confusion after a subsequent patch has added
some options to __git_merge_options and some directly in _git_merge().
Signed-off-by: John Keeping
---
contrib/completion/git-completion.bash | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/completion/git-completio
5-22 14.48, Elia Pinto wrote:
>> Found by check-non-portable-shell.pl
>
> Thanks for picking this up
>> -export TEST_DIRECTORY=$(pwd)/../../../t
>> +TEST_DIRECTORY=$(pwd)/../../../t && export TEST_DIRECTORY
> Minor remark:
> Both commands should go on their own line, like this:
>
> TEST_DIRECTORY=$
[re-adding list cc]
On Thu, May 22, 2014 at 03:16:45PM +0200, Christian Couder wrote:
> > +void strbuf_tolower(struct strbuf *sb)
> > +{
> > + char *p;
> > + for (p = sb->buf; *p; p++)
> > + *p = tolower(*p);
> > +}
>
> Last time I tried a change like the above, I was t
Torsten Bögershausen writes:
> On 2014-05-22 14.48, Elia Pinto wrote:
>> Found by check-non-portable-shell.pl
>
> Thanks for picking this up
>> -export TEST_DIRECTORY=$(pwd)/../../../t
>> +TEST_DIRECTORY=$(pwd)/../../../t && export TEST_DIRECTORY
> Minor remark:
> Both commands should go on their
On 2014-05-22 14.48, Elia Pinto wrote:
> Found by check-non-portable-shell.pl
Thanks for picking this up
> -export TEST_DIRECTORY=$(pwd)/../../../t
> +TEST_DIRECTORY=$(pwd)/../../../t && export TEST_DIRECTORY
Minor remark:
Both commands should go on their own line, like this:
TEST_DIRECTORY=$(pwd
Found by check-non-portable-shell.pl
Signed-off-by: Elia Pinto
---
contrib/subtree/t/t7900-subtree.sh |2 +-
git-remote-testgit.sh |2 +-
git-stash.sh |2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/subtree/t/t7900-subt
Jeff King:
I was really hoping to avoid getting into all of the real-world
messiness that a real http client needs to deal with (as opposed to just
following the standards).
Yeah, I agree, you're probably fine without all this detail in over
99% of the cases where this code would ever be expo
On Thu, May 22, 2014 at 02:40:48AM +0200, Karsten Blees wrote:
> E.g. if I'm interested in a particular code section, I throw in 2
> lines of code (before and after the code section). This gives very
> accurate results, without significantly affecting overall performance.
> I can then push the cha
This makes config's lowercase() function public.
Note that we could continue to offer a pure-string
lowercase, but there would be no callers (in most
pure-string cases, we actually duplicate and lowercase the
duplicate).
Signed-off-by: Jeff King
---
Documentation/technical/api-strbuf.txt | 4 ++
We have two implementations of the same function; let's drop
that to one. We take the name from daemon.c, but the
implementation (which is just slightly more efficient) from
the config code.
Signed-off-by: Jeff King
---
builtin/config.c | 15 +--
daemon.c | 8
strbu
These two patches were pulled from the http charset series I posted
nearby. The second iteration of that series did not need them, but they
may have value as cleanups.
[1/2]: daemon/config: factor out duplicate xstrdup_tolower
[2/2]: strbuf: add strbuf_tolower function
The first one is a real
This is specified by RFC 2616 as the default if no "charset"
parameter is given.
Signed-off-by: Jeff King
---
I'd prefer to do this simple, standard thing, and see how it works in
the real world. We'll hand whatever we get off to iconv, and if it
chokes, we'll pass through the data as-is. That sh
We currently recognize an error message with a content-type
"text/plain; charset=utf-16" as text, but we ignore the
charset parameter entirely. Let's encode it to
log_output_encoding, which is presumably something the
user's terminal can handle.
Signed-off-by: Jeff King
---
remote-curl.c
Since the previous commit, we now give a sanitized,
shortened version of the content-type header to any callers
who ask for it.
This patch adds back a way for them to cleanly access
specific parameters to the type. We could easily extract all
parameters and make them available via a string_list, b
This is a convenience wrapper around `reencode_string_len`
and `strbuf_attach`.
Signed-off-by: Jeff King
---
Documentation/technical/api-strbuf.txt | 5 +
strbuf.c | 17 +
strbuf.h | 1 +
3 files changed, 23 insert
When we get a content-type from curl, we get the whole
header line, including any parameters, and without any
normalization (like downcasing or whitespace) applied.
If we later try to match it with strcmp() or even
strcasecmp(), we may get false negatives.
This could cause two visible behaviors:
Since commit 426e70d (remote-curl: show server content on
http errors, 2013-04-05), we relay any text/plain error
messages from the remote server to the user. However, we
never tested it.
Signed-off-by: Jeff King
---
t/lib-httpd.sh | 1 +
t/lib-httpd/apache.conf| 4
t/lib-
Using write_script will set our shebang line appropriately
with $SHELL_PATH. The script that is there now is quite
simple and likely to succeed even with a non-POSIX /bin/sh,
but it does not hurt to be defensive.
Signed-off-by: Jeff King
---
t/lib-httpd.sh | 6 +-
t/lib-htt
Turning on this variable can be useful when debugging http
tests. It does break a few tests in t5541, but it is not
a variable that the user is likely to have enabled
accidentally.
Signed-off-by: Jeff King
---
t/test-lib.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/test-lib.sh b/t/te
On Wed, May 21, 2014 at 06:25:24AM -0400, Jeff King wrote:
> As of commit 426e70d (remote-curl: show server content on http errors,
> 2013-04-05), we relay any text/plain errors shown by the remote http
> server to the user. However, we were lazy back then and left this TODO
> in place:
>
>
Am 5/22/2014 10:38, schrieb Elia Pinto:
> 2014-05-22 8:49 GMT+02:00 Matthieu Moy :
>> Elia Pinto writes:
>>> @@ -1059,13 +1059,17 @@ cmd_summary() {
>>> while read mod_src mod_dst sha1_src sha1_dst status sm_path
>>> do
>>> # Always show modules de
On Thu, May 22, 2014 at 08:12:58AM +0100, Peter Krefting wrote:
> Kyle J. McKay:
>
> >I think that a strict reading of RFC 2616 allows "text/plain ;
> >charset=utf-8" as well as "text/plain;charset=utf-8" and "text/plain;
> >charset=utf-8".
>
> It does indeed, and I have seen servers send both v
On Thu, May 22, 2014 at 12:27:38AM -0700, Kyle J. McKay wrote:
> Yeah I think so too. It's probably enough though just to just strip all " "
> and "\t" characters at the same time the content type is lowercased. While
> that would cause invalid content types such as "text / plain" to be
> recogn
2014-05-22 8:49 GMT+02:00 Matthieu Moy :
> Elia Pinto writes:
>
>> This is version 2 of the patch to git-submodule of the
>> patch series "convert test -a/-o to && and ||".
>> It contains the fixes identified by Johannes and
>> Matthieu.
>
> This version of the patch (not the whole series) is
>
>
On May 21, 2014, at 23:05, Jeff King wrote:
On Wed, May 21, 2014 at 05:07:38PM -0700, Kyle J. McKay wrote:
+ p = skip_prefix(type->buf, "text/plain");
+ if (!p || (*p && *p != ';'))
+ return 0;
+
+ return 1;
+}
+
I think that a strict reading of RFC 2616 allow
Kyle J. McKay:
+ if (!*charset)
+ *charset = xstrdup("iso8859-1");
Actually the name should be "ISO-8859-1". See RFC 2616 section 3.7.1. Since
it's case insensitive "iso-8859-1" would be fine too.
You'd be amazed at what you see in the wild... I'd recommend going
with
Kyle J. McKay:
I think that a strict reading of RFC 2616 allows "text/plain ; charset=utf-8"
as well as "text/plain;charset=utf-8" and "text/plain; charset=utf-8".
It does indeed, and I have seen servers send both variants, so they do
need to be catered for.
The number of servers that would
98 matches
Mail list logo