Re: What's cooking in git.git (Jun 2016, #10; Wed, 29)

2016-06-29 Thread Ramsay Jones
to store references. > > Is everybody happy with this version? > If so, will merge to 'next'. A small fixup required for this one. see http://thread.gmane.org/gmane.comp.version-control.git/298137 ATB, Ramsay Jones -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/5] add SWAP macro

2017-01-31 Thread Ramsay Jones
rompted by this note, I just built tcc from the current mob branch (@5420bb8) and built git OK, but, yes, lots of tests now fail. :( ATB, Ramsay Jones

Re: [PATCH 08/12] add oidset API

2017-01-24 Thread Ramsay Jones
@ -0,0 +1,49 @@ > +#include "cache.h" > +#include "oidset.h" > + > +struct oidset_entry { > + struct hashmap_entry hash; > + struct object_id oid; > +}; > + > +int oidset_hashcmp(const void *va, const void *vb, static int oidset_hashcmp( ... ATB, Ramsay Jones

Intermittent failure of t1700-split-index.sh

2017-01-26 Thread Ramsay Jones
haredindex.*' files and that their timestamps had not been changed. I can't devote any time to looking at this further tonight (it's 2-45am here, I'm off to bed!). Can you reproduce the problem, or is it just me? :) ATB, Ramsay Jones

Re: [PATCH v3 02/19] builtin/diff-tree: convert to struct object_id

2017-02-17 Thread Ramsay Jones
hunk' would be a plus one 'char' of some sort. Except that the caller of this function has already replaced the newline character with a '\0' char (so strlen(line) would return 81), but still passes the original line length! Also, note that this (and other functions in this file) actually te

Re: [PATCH v3 16/19] sha1_file: introduce an nth_packed_object_oid function

2017-02-17 Thread Ramsay Jones
by ^^^ ... Like nth_packed_object_sha1, but ... Having said that, if the intent is to eventually replace that function with the new nth_packed_object_oid(), then it is probably not a good idea to describe this function in terms of the function it will obsolete. ;-) ATB, Ra

Re: [PATCH 10/15] update submodules: add submodule_move_head

2017-02-23 Thread Ramsay Jones
dex(const char *path) I was just about to send a patch against the previous series (in pu branch last night), but since you have sent another version ... In the last series this was called 'submodule_clean_index()' and, since it is a file-local symbol, should be marked with static. I haven't applied these patches to check, but the interdiff in the cover letter leads me to believe that this will also apply to the renamed function. [The patch subject was also slightly different.] ATB, Ramsay Jones

Re: [PATCH 15/15] builtin/checkout: add --recurse-submodules switch

2017-02-23 Thread Ramsay Jones
static const char * const checkout_usage[] = { > N_("git checkout [] "), > N_("git checkout [] [] -- ..."), > NULL, > }; > > +int option_parse_recurse_submodules(const struct option *opt, > + const char *arg, int unset) Again, this function should be marked static. [I also noted _two_ other local functions with the same name in builtin/fetch.c and builtin/push.c] ATB, Ramsay Jones

Re: [PATCH v6 1/1] config: add conditional include

2017-02-24 Thread Ramsay Jones
current file > path = ~/foo ; expand "foo" in your `$HOME` directory > > + ; include if $GIT_DIR is /path/to/foo/.git > + [include-if "gitdir:/path/to/foo/.git"] s/include-if/includeIf/ > + path = /path/to/foo.inc > + > + ; include for all repositories inside /path/to/group > + [include-if "gitdir:/path/to/group/"] ditto > + path = /path/to/foo.inc > + > + ; include for all repositories inside $HOME/to/group > + [include-if "gitdir:~/to/group/"] ditto ATB, Ramsay Jones

Re: [PATCH 01/11] refs-internal.c: make files_log_ref_write() static

2017-02-13 Thread Ramsay Jones
ely necessary (ie mutually recursive functions), and even in the current 'pu' branch (@c04899d50), the definition of this function appears before all uses in this file. (ie, just add static to the definition). What am I missing? ATB, Ramsay Jones > > static struct ref_dir *get_ref_dir

Re: [PATCH 02/11] files-backend: convert git_path() to strbuf_git_path()

2017-02-13 Thread Ramsay Jones
; + strbuf_git_path(_newref, "logs/%s", newrefname); > + strbuf_git_path(_oldref, "logs/%s", oldrefname); > + if (logmoved && rename(sb_newref.buf, sb_oldref.buf)) ditto > error("unable to restore logfile %s from %s: %s", > oldrefname, newrefname, strerror(errno)); > + strbuf_git_path(_renamed_log, TMP_RENAMED_LOG); > if (!logmoved && log && > - rename(git_path(TMP_RENAMED_LOG), git_path("logs/%s", oldrefname))) > + rename(tmp_renamed_log.buf, sb_oldref.buf)) similar > error("unable to restore logfile %s from "TMP_RENAMED_LOG": %s", > oldrefname, strerror(errno)); > + strbuf_release(_newref); > + strbuf_release(_oldref); > + strbuf_release(_renamed_log); > > return 1; > } ATB, Ramsay Jones

Re: [PATCH 03/11] files-backend: add files_path()

2017-02-13 Thread Ramsay Jones
"%s", tmp.buf); > + else > + strbuf_git_path(sb, "%s", tmp.buf); > + strbuf_release(); > +} > + > /* > * Increment the reference count of *packed_refs. > */ > ATB, Ramsay Jones

Re: [PATCH 04/11] files-backend: replace *git_path*() with files_path()

2017-02-13 Thread Ramsay Jones
ck used for the main packed-refs file: */ > static struct lock_file packlock; > > -void files_path(struct files_ref_store *refs, struct strbuf *sb, > - const char *fmt, ...) > +static void files_path(struct files_ref_store *refs, struct strbuf *sb, > +const char *fmt, ...) > { > struct strbuf tmp = STRBUF_INIT; > va_list vap; ATB, Ramsay Jones

Re: [PATCH] attr: mark a file-local symbol as static

2017-01-18 Thread Ramsay Jones
On 18/01/17 23:05, Brandon Williams wrote: > On 01/18, Ramsay Jones wrote: >> >> Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> >> --- >> >> Hi Brandon, >> >> If you need to re-roll your 'bw/attr' branch, could you please >&g

[PATCH] attr: mark a file-local symbol as static

2017-01-18 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Brandon, If you need to re-roll your 'bw/attr' branch, could you please squash this into the relevant patch (commit 8908457159, "attr: use hashmap for attribute dictionary", 12-01-2017). Also, I not

[PATCH 1/2] wrapper.c: remove unused git_mkstemp() function

2017-02-27 Thread Ramsay Jones
The last caller of git_mkstemp() was removed in commit 6fec0a89 ("verify_signed_buffer: use tempfile object", 16-06-2016). Since the introduction of the 'tempfile' APIs, along with git_mkstemp_mode, it is unlikely that new callers will materialize. Remove the dead code. Signed-off-

[PATCH 0/2] remove unused 'mkstemp(s)' code

2017-02-27 Thread Ramsay Jones
I promised the first of these patches on 18th June last year! ;-) (In response to Jeff's 'jk/gpg-interface-cleanup' branch). Ramsay Jones (2): wrapper.c: remove unused git_mkstemp() function wrapper.c: remove unused gitmkstemps() function Makefile | 5 - cache.h

[PATCH 2/2] wrapper.c: remove unused gitmkstemps() function

2017-02-27 Thread Ramsay Jones
itmkstemps() function. Remove the dead code, along with the defunct build machinery. Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Makefile | 5 - config.mak.uname | 17 - configure.ac | 6 -- git-compat-util.h | 5 - wrapper.c

Re: [PATCH v7 3/3] config: add conditional include

2017-03-01 Thread Ramsay Jones
al includes > + > + > +You can include a config file from another conditionally by setting a > +`includeIf..path` variable to the name of the file to be > +included. The variable's value is treated the same way as > +`include.path`. `includeIf.path` supports multiple key ^^ s/path/.path/ ATB, Ramsay Jones

Re: [PATCHv4] diff.c: emit moved lines with a different color

2016-09-06 Thread Ramsay Jones
_entry *b, > + const void *unused) > +{ > + return strcmp(a->line, b->line) && > +a->hash_prev_line == b->hash_prev_line; I doubt it would make much difference, but my knee-jerk reaction to this was to suggest swapping the order of the expression, thus: return a->hash_prev_line == b->hash_prev_line && strcmp(a->line, b->line); ... but perhaps it doesn't read quite so well, and probably wouldn't affect performance much (except in strange edge cases), so it may not be worth it. ATB, Ramsay Jones

Re: [PATCH v13 10/14] apply: change error_routine when silent

2016-09-04 Thread Ramsay Jones
... >> >> Ok to do that. > > Actually I get the following error when doing that: > > apply.c: In function ‘mute_routine’: > apply.c:115:1: error: parameter name omitted > static void mute_routine(const char *, va_list) > ^ > apply.c:115:1: error: parameter name omitted > make: *** [apply.o] Error 1 Yes, this is not C++. ;-) > So I will leave it as is. I think I would prefer to see: static void mute_routine(const char *msg, va_list params) given that it would either be an error-msg or a warning-msg. ATB, Ramsay Jones

Re: [PATCH 2/3] diff_flush_patch_id: stop returning error result

2016-09-07 Thread Ramsay Jones
ability to two diff blobs, ^ Huh? ... to diff two blobs? ATB, Ramsay Jones

[PATCH] pkt-line: mark a file-local symbol static

2016-09-14 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Lars, If you need to re-roll your 'ls/filter-process' branch, could you please squash this into the relevant patch; commit 2afd9b22 ("pkt-line: add packet_write_gently()", 08-09-2016). [If you think the symbol sho

Re: [PATCH v2 3/3] Use the newly-introduced regexec_buf() function

2016-09-08 Thread Ramsay Jones
s set up earlier by: echo 'binaryQfile' | q_to_nul >a] commit f96e5673 ("grep: use REG_STARTEND for all matching if available", 22-05-2010) introduced this test and expects ".. NUL characters themselves are not matched in any way". With the native library on cygwin they are matched, with the compat/regex they are not. Indeed, if you use the system 'grep' command (rather than 'git grep'), then it will also not match ... :-D Slightly off topic, but ... ATB, Ramsay Jones

Re: [PATCH] run-command: async_exit no longer needs to be public

2016-09-23 Thread Ramsay Jones
m the result of the above from me first and then start your >>> work from it, though, if we go that route. >> >> Sounds good to me! > > OK, here is what I queued, then. This looks good to me. Thanks! ATB, Ramsay Jones

Re: Regression: git no longer works with musl libc's regex impl

2016-10-06 Thread Ramsay Jones
008-grep-binary.sh, where the cygwin native regex library matches '.' in a pattern with the NUL character. ie the test_expect_failure test passes.] ATB, Ramsay Jones

[PATCH] run-command: fix build on cygwin (stdin is a macro)

2016-10-05 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Lars, Commit 6007c69e ("run-command: add wait_on_exit", 04-10-2016), which is part of your 'ls/filter-process' branch, causes the build to fail on cygwin, since 'stdin' is defined as a macro thus: #define

[PATCH] run-command: async_exit no longer needs to be public

2016-09-22 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Lars, If you need to re-roll your 'ls/filter-process' branch, could you please squash this into the relevant commit c42a4cbc ("run-command: move check_pipe() from write_or_die to run_command", 20-09-2016). [

[PATCH] diff: mark a file-local symbol static

2016-08-24 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Michael, If you need to re-roll your 'mh/diff-indent-heuristic' branch, could you please squash this into the relevant patch (commit 8f5cc189, "diff: improve positioning of add/delete blocks in diffs", 22-08-2016

Re: [PATCH v2] gpg-interface: use more status letters

2016-09-28 Thread Ramsay Jones
ignature that has expired, or a good signature made with an expired key, [Although that is still a bit cumbersome.] ATB, Ramsay Jones

Re: [RFC PATCH v2] revision: new rev^-n shorthand for rev^n..rev

2016-09-25 Thread Ramsay Jones
gt; +static int try_parent_exclusion(const char *arg) > +{ > + int ret = 0; > + char *to_rev = NULL; > + char *from_rev = NULL; > + unsigned char to_sha1[20]; > + unsigned char from_sha1[20]; As Matthieu already mentioned, maybe use 'struct object_id' here. > + > + if (parse_parent_exclusion(arg, _rev, _rev)) > + goto out; > + if (get_sha1_committish(to_rev, to_sha1)) ... then 'to_sha1.hash' here, etc ... ATB, Ramsay Jones

Re: [PATCH v2] gpg-interface: use more status letters

2016-09-28 Thread Ramsay Jones
or a bad signature, > - "U" for a good signature with unknown validity and "N" for no signature > +- '%G?': show "G" for a good (valid) signature, > + "B" for a bad signature, > + "U" for a good signature with unknown validity, > + "X" for a good expired signature, or good signature made by an expired key, Hmm, this looks odd. Would the following: "X" for a good signature made with an expired key, mean something different? ATB, Ramsay Jones

[PATCH] tmp-objdir: mark some file local symbols static

2016-10-01 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Jeff, If you need to re-roll your 'jk/quarantine-received-objects' branch, could you please squash this into the relevant patches. [I also note that tmp_objdir_destroy(), declared to be part of the public int

Re: [PATCH] Allow stashes to be referenced by index only

2016-10-25 Thread Ramsay Jones
r. > > Perhaps > > Instead of referencing "stash@{n}" explicitly, make it possible to > simply reference as "n". Most users only reference stashes by their > position in the stash stask (what I refer to as the "index" here). s/stask/stack/ ATB, Ramsay Jones

Re: [PATCH 17/36] attr: expose validity check for attribute names

2016-10-23 Thread Ramsay Jones
and it certainly seems like it should be part of the public interface, but ...) In contrast, the 'invalid_attr_name_message()' function is called from code in pathspec.c, which relies on 'git_attr_counted()' to call 'attr_name_valid()' internally to check for validity. :-D ATB, Ramsay Jones

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-23 Thread Ramsay Jones
e.c > @@ -2216,6 +2216,36 @@ static int write_shared_index(struct index_state > *istate, > return ret; > } > > +static const int default_max_percent_split_change = 20; > + > +int too_many_not_shared_entries(struct index_state *istate) This function is a file-loacal symbol; could you please make it a static function. Thanks. ATB, Ramsay Jones

Re: [PATCH 28/36] attr: keep attr stack for each check

2016-10-23 Thread Ramsay Jones
t attr_stack *prev; > char *origin; > size_t originlen; > unsigned num_matches; > unsigned alloc; > struct match_attr **attrs; > -} *attr_stack; > +}; > + > +struct hashmap all_attr_stacks; > +int all_attr_stacks_init; Mark symbols 'all

Re: [PATCH 1/2] t9000-addresses: update expected results after fix

2016-10-21 Thread Ramsay Jones
a consequence, some tests comparing it to >> Mail::Address now pass, but e3fdbcc8e1 forgot to update the test. >> >> Signed-off-by: Matthieu Moy <matthieu@imag.fr> >> --- > > Thanks. Yep, thanks for looking into this Matthieu. I applied these cleanly (to both

t9000-addresses.sh: unexpected pases

2016-10-20 Thread Ramsay Jones
simply requires a change from expect_fail to expect_success, since your commit has 'fixed' these tests ... would you mind taking a quick look? Thanks! ATB, Ramsay Jones

Re: [PATCH] convert: mark a file-local symbol static

2016-10-17 Thread Ramsay Jones
On 17/10/16 21:07, Junio C Hamano wrote: > Ramsay Jones <ram...@ramsayjones.plus.com> writes: > >> Heh, I actually have the following in my config.mak already: >> >> extra-clean: clean >> find . -iname '*.o' -exec rm {} \; >> >>

Re: [PATCH] worktree: fix a sparse 'Using plain integer as NULL pointer' warning

2016-11-15 Thread Ramsay Jones
On 15/11/16 20:28, Ramsay Jones wrote: > > Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> > --- > > Hi Duy, > > If you need to re-roll your 'nd/worktree-move' branch, could you > please squash this into the relevant patch [commit c49e92f5c >

[PATCH] attr: mark a file-local symbol as static

2016-11-13 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Stefan, If you need to re-roll your 'sb/attr' branch, could you please squash this into the relevant patch. Alternatively, since there is only a single call site for git_attr() (on line #1005), you could perhaps remove gi

[PATCH] worktree: fix a sparse 'Using plain integer as NULL pointer' warning

2016-11-15 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Duy, If you need to re-roll your 'nd/worktree-move' branch, could you please squash this into the relevant patch [commit c49e92f5c ("worktree move: refuse to move worktrees with submodules", 12-11-2016)]. Also

Re: [PATCH] t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables

2016-11-14 Thread Ramsay Jones
ashed as appropriate. No patch this time, but it simply requires those variables to be initialised to NULL in their declarations. :-D >I know that Ramsay Jones does this, for > example, with some of his sparse-related checks, and I'm pretty sure > from the

Re: [PATCHv2 00/36] Revamp the attr subsystem!

2016-10-28 Thread Ramsay Jones
D_MUTEX_INITIALIZER, since it causes sparse to issue some warnings, but I see that you have decided not to use it. So, phew! ;-) ATB, Ramsay Jones

[PATCH] sequencer: mark a file-local symbol static

2016-10-11 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Johannes, If you need to re-roll your 'js/prepare-sequencer' branch, could you please squash this into commit 53f8024e ("sequencer: completely revamp the "todo" script parsing", 10-10-2016).

[PATCH] convert: mark a file-local symbol static

2016-10-11 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Lars, If you need to re-roll your 'ls/filter-process' branch, could you please squash this into commit 85290197 ("convert: add filter..process option", 08-10-2016). Thanks. ATB, Ramsay Jones convert.c | 2 +- 1

Re: [PATCH] convert: mark a file-local symbol static

2016-10-15 Thread Ramsay Jones
On 15/10/16 16:05, Lars Schneider wrote: >> On 11 Oct 2016, at 16:46, Ramsay Jones <ram...@ramsayjones.plus.com> wrote: [snip] >> -void stop_multi_file_filter(struct child_process *process) >> +static void stop_multi_file_filter(struct child_process *process) > &g

[PATCH] trailer: mark file-local symbol 'conf_head' static

2016-10-15 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Jonathan, If you need to re-roll your 'jt/trailer-with-cruft' branch, could you please squash this into the relevant patch. [commit 3fb120de ("trailer: use list.h for doubly-linked list", 14-10-2016)] Thanks! A

Re: [PATCH] convert: mark a file-local symbol static

2016-10-16 Thread Ramsay Jones
On 16/10/16 01:15, Lars Schneider wrote: >> On 15 Oct 2016, at 14:01, Ramsay Jones <ram...@ramsayjones.plus.com> wrote: >> On 15/10/16 16:05, Lars Schneider wrote: >>>> On 11 Oct 2016, at 16:46, Ramsay Jones <ram...@ramsayjones.plus.com> wrote: >> [snip

Re: [PATCH] convert: mark a file-local symbol static

2016-10-17 Thread Ramsay Jones
On 17/10/16 03:18, Jeff King wrote: > On Mon, Oct 17, 2016 at 02:37:58AM +0100, Ramsay Jones wrote: > >> Hmm, well, you have to remember that 'make clean' sometimes >> doesn't make clean. Ever since the Makefile was changed to only >> remove $(OBJECTS), rather than *.o

Re: [PATCH] convert: mark a file-local symbol static

2016-10-17 Thread Ramsay Jones
y config.mak already: extra-clean: clean find . -iname '*.o' -exec rm {} \; But for some reason I _always_ type 'make clean' and then, to top it off, I _always_ type the 'find' command by hand (I have no idea why) :-D ATB, Ramsay Jones

[PATCH] branch: mark a file-local symbol with static

2016-12-10 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Karthik, If you need to re-roll your 'kn/ref-filter-branch-list' branch, could you please squash this into the relevant patch (commit 715a4826ab, "branch: use ref-filter printing APIs", 07-12-2016). Thanks! A

Re: [PATCH] real_path: make real_path thread-safe

2016-12-06 Thread Ramsay Jones
of windows networks! (where it is usually denoted by \\servername\path). You can see the relics of unix UNC paths if you look at the wording for basename() in the POSIX standard. Note the special treatment of the path which 'is exactly "//"', see http://pubs.opengroup.org/onlinepubs/009695399/functions/basename.html ATB, Ramsay Jones

Re: [RFC PATCH] GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling

2016-12-06 Thread Ramsay Jones
g --abbrev and letting describe do its default thing (as >> configured by whoever is doing the build), let's do so. >> >> -- >8 -- >> From: Ramsay Jones <ram...@ramsayjones.plus.com> >> Date: Sun, 4 Dec 2016 20:45:59 + >> Subject: [PATCH] GIT-V

Re: What's cooking in git.git (Dec 2016, #04; Fri, 16)

2016-12-17 Thread Ramsay Jones
. > > Also Jeff suggested some changes, which I've incorporated into my local > branch. > (http://marc.info/?t=14811250361=1=2). I'll reroll if no > further changes are > suggested soon :) Not forgetting to make 'quote_literal_for_format()' static. ;-) ATB, Ramsay Jones

test failure

2016-12-16 Thread Ramsay Jones
n't have time to investigate further tonight and, since I had not heard anyone else complain, I thought I should let you know. See below for the output from a failing run. [Note: this is on Linux Mint 18, tonight's pu branch @7c7984401]. ATB, Ramsay Jones $ ./t0021-conversion.sh -i -v ... ok 14 - d

[PATCH] worktree: fix an 'using plain integer as NULL pointer' warning

2017-01-12 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Duy, If you need to re-roll your 'nd/worktree-move' branch, could you please squash this into the relevant patch. (commit 62985f75c1 "worktree move: refuse to move worktrees with submodules", 08-01-2017). [BTW,

Re: [PATCH] difftool.c: mark a file-local symbol with static

2016-11-30 Thread Ramsay Jones
On 30/11/16 11:07, Johannes Schindelin wrote: > Hi Ramsay, > > On Tue, 29 Nov 2016, Ramsay Jones wrote: >> Also, due to a problem in my config.mak file on Linux (a commented >> out line that had a line continuation '\', gr!), gcc issued a >> warning, thus:

Re: [PATCH 4/6] http: make redirects more obvious

2016-12-01 Thread Ramsay Jones
on Bob's server. Mallory runs her own server and Ahem, so Mallory is female? (-blush-) :( ATB, Ramsay Jones

Re: [PATCH 2/6] http: always update the base URL for redirects

2016-12-01 Thread Ramsay Jones
follows up by asking > the server for one or more sha1 objects. But who is the > server? > > If it is still Mallory's server, then Alice will leak the > existence of those sha1s to her. ------^^^ ... to _him_ ? (again Mallory) ATB, Ramsay Jones

Re: [PATCH 2/6] http: always update the base URL for redirects

2016-12-01 Thread Ramsay Jones
g the description of 'Man-in-the-middle Attack' from Applied Cryptography (Bruce Schneier) which implies that Mallory is male. ATB, Ramsay Jones

Re: [PATCH 2/6] http: always update the base URL for redirects

2016-12-01 Thread Ramsay Jones
On 02/12/16 00:18, Jeff King wrote: > On Fri, Dec 02, 2016 at 12:07:50AM +0000, Ramsay Jones wrote: > >>>> In a British context "Mallory and Irvine" were two (male) climbers who >>>> died on Everest in 1924 (tales of daring...), so it's easy to

[PATCH] difftool.c: mark a file-local symbol with static

2016-11-29 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Johannes, If you need to re-roll your 'js/difftool-builtin' branch, could you please squash this into the relevant patch. Thanks! Also, due to a problem in my config.mak file on Linux (a commented out line that had

Re: [RFC PATCH] GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling

2016-12-05 Thread Ramsay Jones
On 05/12/16 18:10, Junio C Hamano wrote: > Ramsay Jones <ram...@ramsayjones.plus.com> writes: > >> Heh, that was the first version of the patch. However, I got to thinking >> about why --abbrev=7 was there in the first place; the only reason I >> could think of was

Re: [RFC PATCH] GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling

2016-12-05 Thread Ramsay Jones
On 05/12/16 22:24, Junio C Hamano wrote: > Ramsay Jones <ram...@ramsayjones.plus.com> writes: > >> As I said, the original version of the patch just removed the >> --abbrev=7, but then I started to think about why you might have >> used --abbrev in the first pl

Re: [RFC PATCH] GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling

2016-12-05 Thread Ramsay Jones
On 05/12/16 05:32, Jeff King wrote: > On Sun, Dec 04, 2016 at 08:45:59PM +0000, Ramsay Jones wrote: >> I recently noticed that: >> >> $ make >pout 2>&1 >> $ ./git version >> git version 2.11.0.286.g109e8a9 >> $ git describe >>

[RFC PATCH] GIT-VERSION-GEN: set --abbrev=9 to match auto-scaling

2016-12-04 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Junio, I recently noticed that: $ make >pout 2>&1 $ ./git version git version 2.11.0.286.g109e8a9 $ git describe v2.11.0-286-g109e8a99d $ ... for non-release builds, the commit part of th

Re: [PATCH] difftool.c: mark a file-local symbol with static

2016-11-30 Thread Ramsay Jones
e of that conversation, we should be doing: >> >> warning("%s", ""); >> >> here. > > I forgot too. Thanks for digging up that thread. Yes, I blamed wt-status.c:227 and came up with commit 7d7d68022 as well. So, by the same rationale, we should remove -Wno-format-zero-length from DEVELOPER_CFLAGS. yes? ATB, Ramsay Jones

Re: [PATCH] difftool.c: mark a file-local symbol with static

2016-11-30 Thread Ramsay Jones
On 30/11/16 21:25, Jeff King wrote: > On Wed, Nov 30, 2016 at 12:40:25PM -0800, Junio C Hamano wrote: > >> Ramsay Jones <ram...@ramsayjones.plus.com> writes: >> >>> [I have fixed my config.mak file now, so I don't see the warning >>> anymore! Having -

[PATCH] worktree: mark a file-local symbol with static

2016-12-02 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Stefan, If you need to re-roll your 'sb/submodule-intern-gitdir' branch, could you please squash something similar to this into the relevant patch (commit 2529715dc, "worktree: get worktrees from submodules&q

[PATCH] read-cache: mark a file-local symbol with static

2017-01-01 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Christian, If you need to re-roll your 'cc/split-index-config' branch, could you please squash this into the relevant patch (commit 8a7e3ef9a6, "read-cache: touch shared index files when used", 26-12-2016). Than

Re: [PATCH v1] t0021: fix flaky test

2016-12-19 Thread Ramsay Jones
rm -f test2.r "testsubdir/test3 '\''sq'\'',\$x=.r" && > > filter_git checkout --quiet --no-progress . && > I applied this to the pu branch and ran the test by hand 48 times in a row without failure. (the most trials without error beforehand was 24). Thanks. ATB, Ramsay Jones

Re: [PATCH] branch doc: Change `git branch ` to use ``

2017-03-23 Thread Ramsay Jones
end of the command line, list only the branches that > match any of the given patterns. Do not forget '-l' > and say "git branch ", as it will instead > try to create a new branch whose name is , > which is a common mistake. Hmm, but with git-branch -l means --create-reflog not --list. I have make the mistake of using -l rather than --list several times ... :D ATB, Ramsay Jones

[PATCH] name-hash: add test-lazy-init-name-hash to .gitignore

2017-03-24 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Jeff, If you need to re-roll your 'jh/memihash-opt' branch, could you please squash this into the relevant patch (commit f25dde4fbf, "name-hash: add test-lazy-init-name-hash", 23-03-2017). Thanks! ATB, Ramsay

Re: [PATCH] name-hash: add test-lazy-init-name-hash to .gitignore

2017-03-24 Thread Ramsay Jones
On 24/03/17 17:26, Ramsay Jones wrote: > > Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> > --- > > Hi Jeff, > > If you need to re-roll your 'jh/memihash-opt' branch, could you please > squash this into the relevant patch (commit f25dde4fbf, "n

Re: [PATCH v2 5/7] name-hash: perf improvement for lazy_init_name_hash

2017-03-23 Thread Ramsay Jones
> +} > + > +static inline int compute_dir_lock_nr( > + const struct hashmap *map, > + unsigned int hash) > +{ > + return hashmap_bucket(map, hash) % LAZY_MAX_MUTEX; > +} > + > +static struct dir_entry *hash_dir_entry_with_parent_and_prefix( > + struct index_state *istate, > + struct dir_entry *parent, > + struct strbuf *prefix) > +{ > + struct dir_entry *dir; > + unsigned int hash; > + int lock_nr; > + > + /* > + * Either we have a parent directory and path with slash(es) > + * or the directory is an immediate child of the root directory. > + */ > + assert((parent != NULL) ^ (strchr(prefix->buf, '/') == 0)); sparse complains about 'Using plain integer as a NULL pointer', (the return from strchr() is NULL, if '/' is not found) so maybe: + assert((parent != NULL) ^ (strchr(prefix->buf, '/') == NULL)); ATB, Ramsay Jones

Re: [PATCH v2 6/7] name-hash: add test-lazy-init-name-hash

2017-03-23 Thread Ramsay Jones
} > + if (count > 1) { > + avg_single = sum_single / count; > + avg_multi = sum_multi / count; > + if (!nr_threads_used) > + printf("avg [size %8d] [single %f]\n", > +nr, > +(double)avg_single/10); > + else > + printf("avg [size %8d] [single %f] %c [multi %f > %d]\n", > +nr, > +(double)avg_single/10, > +(avg_single < avg_multi ? '<' : '>'), > +(double)avg_multi/10, > +nr_threads_used); > + fflush(stdout); > + } > + > + if (nr >= cache_nr_limit) > + return; > + nr += analyze_step; > + } > +} ATB, Ramsay Jones

Subject: [PATCH 2/2] refs: remove forward declaration for files_log_ref_write()

2017-03-19 Thread Ramsay Jones
ic keyword to the function definition. Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Duy, If you need to re-roll your 'nd/files-backend-git-dir' branch, could you please squash this into the relevant patch. Thanks! ATB, Ramsay Jones refs/files-backend.c | 12 1

[PATCH 1/2] refs: remove unused head_ref_submodule() implementation

2017-03-19 Thread Ramsay Jones
commit 990eaca068 ("refs: remove dead for_each_*_submodule()", 18-03-2017) removed the public declaration of head_ref_submodule(), but forgot to remove the definition. Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Duy, If you need to re-roll your 'nd/p

Re: [PATCH v6 02/27] files-backend: make files_log_ref_write() static

2017-03-19 Thread Ramsay Jones
You changed the declaration, but the definition still makes the function > non-static. Actually, this is a static symbol, since it's 'static-ness' derives from the above forward declaration. However, as I said in a previous email, this tickles sparse to issue a warning. In addition, simply adding 'static' to the definition (ie simply _don't_ do the forward declaration) is less work! :-D ATB, Ramsay Jones

[PATCH] revision.c: fix an 'Using integer as NULL pointer' warning

2017-03-19 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Duy, If you need to re-roll your 'nd/prune-in-worktree' branch, could you please squash this into the relevant patch (commit 0a30ae48bb, "revision.c: --indexed-objects add objects from all worktrees", 18-03-2017

Re: [PATCH v2 2/5] sha1_file.c: make pack-name helper globally accessible

2017-03-16 Thread Ramsay Jones
is to cater to people using the various GIT_ environment variables doing things like: $ GIT_OBJECT_DIRECTORY=./my-objects git It has always puzzled me slightly, why the git_path functions do this normalization, but (for example) setup_git_env(), git_path_from_env(), get_common_dir(), ... don't! ;-) ATB, Ramsay Jones

Re: [PATCH v2 4/5] replace snprintf with odb_pack_name()

2017-03-16 Thread Ramsay Jones
t;sha1, "keep"); > + unlink_or_warn(name.buf); > } > + strbuf_release(); > } > > static int loosen_small_pack(const struct packed_git *p) > @@ -1035,6 +1032,7 @@ static void end_packfile(void) > die("core git rejected index %s", idx_name); > all_packs[pack_id] = new_p; > install_packed_git(new_p); > + free(idx_name); Ah, OK. Yep, no leaks here. ;-) > > /* Print the boundary */ > if (pack_edges) { > ATB, Ramsay Jones

Re: [PATCH v2 5/5] index-pack: make pointer-alias fallbacks safer

2017-03-16 Thread Ramsay Jones
"idx"); > if (finalize_object_file(curr_index_name, final_index_name)) > die(_("cannot store index file")); > } else > @@ -1458,7 +1460,9 @@ static void final(const char *final_pack_name, const > char *curr_pack_name, > } > } > > - strbuf_release(); > + strbuf_release(_name); > + strbuf_release(_name); > + strbuf_release(_name_buf); > } > > static int git_index_pack_config(const char *k, const char *v, void *cb) > Yep, much better. ATB, Ramsay Jones

[PATCH] submodule.c: fix an 'using integer as NULL pointer' warning

2017-03-15 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Brandon, If you need to re-roll your 'bw/submodule-is-active' branch, could you please squash this into the relevant patch (commit 20d59ab335, "submodule: decouple url and submodule existence", 13-03-2017). Than

Re: [GSoC][PATCH v5 2/3] credential-cache: use XDG_CACHE_HOME for socket

2017-03-17 Thread Ramsay Jones
of the --file option description). > + `~/.git-credential-cache/` exists in which case > + `~/.git-credential-cache/socket` is used instead. > + If your home directory is on a network-mounted filesystem, you > + may need to change this to a local filesystem. You must specify > + an absolute path. ATB, Ramsay Jones

Re: [RFC PATCH] Move SHA-1 implementation selection into a header file

2017-03-14 Thread Ramsay Jones
2-8). I can't remember if it's allowed in C89/C90 (I think it is). I only have immediate access to the C99 and C11 standards (and I can't be bothered to search), so I can't say for sure. ATB, Ramsay Jones

Re: [RFC PATCH] Move SHA-1 implementation selection into a header file

2017-03-14 Thread Ramsay Jones
On 14/03/17 23:46, brian m. carlson wrote: > On Tue, Mar 14, 2017 at 11:42:20PM +0000, Ramsay Jones wrote: >> >> >> On 14/03/17 20:44, Junio C Hamano wrote: >>> OK, then I'll queue this. The selection still goes to BASIC_CFLAGS >>> so the dependencies

Re: [RFC PATCH] Move SHA-1 implementation selection into a header file

2017-03-15 Thread Ramsay Jones
On 15/03/17 15:57, Junio C Hamano wrote: > Ramsay Jones <ram...@ramsayjones.plus.com> writes: > >> On 14/03/17 23:46, brian m. carlson wrote: >>>>> >>>>> Since the SHA1_HEADER include is not defined in such a case, developers >>>>>

Re: [PATCH 1/6] index-pack: factor out pack/idx finalization

2017-03-15 Thread Ramsay Jones
ame)) > - die(_("cannot store index file")); > - } else > - chmod(final_index_name, 0444); Is from_stdin always true if final_index_name == curr_index_name? Was the original asymmetry deliberate? > + finalize_file(final_pack_name, curr_pack_name, sha1, "pack"); > + finalize_file(final_index_name, curr_index_name, sha1, "idx"); > > if (!from_stdin) { > printf("%s\n", sha1_to_hex(sha1)); > ATB, Ramsay Jones

Re: [PATCH v2 00/20] Separate `ref_cache` into a separate module

2017-04-01 Thread Ramsay Jones
e topics (especially the other one) that needs updating > before that happens. Hmm, are these branches 'tangled' with nd/prune-in-worktree? (I think they were at one point, but maybe not now?). I sent Duy some comments on that branch (an unused function and a 'plain integer used as NULL pointer' warning). ATB, Ramsay Jones

Re: [PATCH v5] http.postbuffer: allow full range of ssize_t values

2017-04-04 Thread Ramsay Jones
ZE_LARGE to set the > buffer size. > > Signed-off-by: David Turner <dtur...@twosigma.com> > --- > > V5 addresses comments from Torsten Boegershausen and Ramsay Jones. Since > I don't have a 32-bit machine handy, it's difficult for me to check > for compiler war

Re: [PATCH v2 1/2] test-online-cpus: helper to return cpu count

2017-04-04 Thread Ramsay Jones
100644 --- a/t/helper/test-online-cpus.c +++ b/t/helper/test-online-cpus.c @@ -1,3 +1,4 @@ +#include "git-compat-util.h" #include "stdio.h" #include "thread-utils.h" $ Otherwise, this series fixes the test for me. Thanks! ATB, Ramsay Jones

Re: [PATCH v2 00/20] Separate `ref_cache` into a separate module

2017-04-02 Thread Ramsay Jones
On 02/04/17 04:38, Junio C Hamano wrote: > Ramsay Jones <ram...@ramsayjones.plus.com> writes: > >>> I am getting the impression that the files-backend thing as well as >>> this topic are ready for 'next'. Please stop me if I missed something >>> in

Re: [PATCH v3 08/12] refs: remove dead for_each_*_submodule()

2017-04-19 Thread Ramsay Jones
`for_each_remote_ref_submodule()` > - do the same as the functions described above but for a specified > - submodule. > +* Use `refs_` API for accessing submodules. The submodule ref store could > + be obtained with `get_submodule_ref_store(). missing ` ? ^ ATB, Ramsay Jones

git v2.13.0-rc0 test failures on cygwin

2017-04-23 Thread Ramsay Jones
Hi Junio, Adam, [Adam, if you are no longer the git package maintainer for cygwin, then please ignore this email and sorry for the noise!] On thursday evening, I ran the test-suite on the newly minted v2.13.0-rc0 release on cygwin, which unfortunately failed (the 'test-out' files are from the

Re: [PATCH 1/2] config: check if config path is a file before parsing it

2017-03-03 Thread Ramsay Jones
onfig.c b/config.c > index c6b874a7bf..c21c0ce433 100644 > --- a/config.c > +++ b/config.c > @@ -13,6 +13,7 @@ > #include "hashmap.h" > #include "string-list.h" > #include "utf8.h" > +#include "dir.h" Something is a bit odd here - nothing in this commit (that I can see, anyway) would require the addition of this include. Also, this include is already there in the 'pu' branch, brought in by your conditional include changes. So, ... ATB, Ramsay Jones

Re: [PATCH] http: inform about alternates-as-redirects behavior

2017-03-04 Thread Ramsay Jones
round the "!=", but maybe > that's just me. It's probably just me (too), but I think it would read better without having '!=true' in the message at all. ;-) ATB, Ramsay Jones

[PATCH] read-tree: mark a file-local symbol as static

2017-03-08 Thread Ramsay Jones
Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- Hi Stefan, If you need to re-roll your 'sb/checkout-recurse-submodules' branch, could you please squash this into the relevant patch (commit 97aadb19f1, "builtin/read-tree: add --recurse-submodules switch", 06-03-201

<    1   2   3   4   5   6   7   8   9   10   >