Re: [PATCH] strtoul_ui: actually report error in case of negative input

2015-09-16 Thread Matthieu Moy
Max Kirillov writes: > On Tue, Sep 15, 2015 at 08:50:03AM +0200, Matthieu Moy wrote: >> --- a/git-compat-util.h >> +++ b/git-compat-util.h >> @@ -814,6 +814,9 @@ static inline int strtoul_ui(char const *s, int base, >> unsigned int *result) >> char *p; >> >>

Re: [PATCH v4 5/8] branch: drop non-commit error reporting

2015-09-16 Thread Karthik Nayak
On Tue, Sep 15, 2015 at 1:19 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> Remove the error reporting variable to make the code easier to port >> over to using ref-filter APIs. This variable is not required as in >> ref-filter we already check

Re: [PATCH v4 3/8] branch: roll show_detached HEAD into regular ref_list

2015-09-16 Thread Karthik Nayak
On Tue, Sep 15, 2015 at 1:05 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> + /* >> + * First we obtain all regular branch refs and if the HEAD is >> + * detached then we insert that ref to the end of the ref_fist >> + * so

Re: "Medium" log format: change proposal for author != committer

2015-09-16 Thread Jacob Keller
On Tue, Sep 15, 2015 at 6:52 PM, Junio C Hamano wrote: > > * Enhance the "--pretty=format:" thing so that the current set of >hardcoded --pretty=medium,short,... formats and your modified >"medium" can be expressed as a custom format string. > > * Introduce a

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Jeff King
On Tue, Sep 15, 2015 at 01:38:42PM -0700, Stefan Beller wrote: > Some off topic thoughts: > > Having an "assert" behavior is not a good user experience though > and should be fixed. To fix it we need stack traces. And the git > version. And telling the user to send it to the mailing list. Yes,

Big path on git add file [windows bug]

2015-09-16 Thread Alexey Kasyanchuk
I tried add one of node.js module to git project. But add operation failed: libgit2 returned: Invalid path for filesystem

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Jeff King
On Tue, Sep 15, 2015 at 11:19:21PM -0400, Eric Sunshine wrote: > > strcpy(hexbuf[stage], sha1_to_hex(ce->sha1)); > > - sprintf(ownbuf[stage], "%o", ce->ce_mode); > > + xsnprintf(ownbuf[stage], sizeof(ownbuf[stage]), "%o", > > ce->ce_mode); > >

Re: Big path on git add file [windows bug]

2015-09-16 Thread Johannes Schindelin
Hi Alexey, On 2015-09-16 10:01, Alexey Kasyanchuk wrote: > I tried add one of node.js module to git project. But add operation failed: > > libgit2 returned: Invalid path for filesystem >

Re: [PATCH v5 6/7] git-p4: add support for large file systems

2015-09-16 Thread Luke Diamand
On 14/09/15 14:26, larsxschnei...@gmail.com wrote: From: Lars Schneider Perforce repositories can contain large (binary) files. Migrating these repositories to Git generates very large local clones. External storage systems such as Git LFS [1], Git Fat [2], Git Media

Re: [PATCH v4] gc: save log from daemonized gc --auto and print it next time

2015-09-16 Thread Michael Haggerty
On 09/14/2015 07:37 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Thanks, will queue. > > Ehh, I spoke a bit too early. > >>> diff --git a/builtin/gc.c b/builtin/gc.c >>> index bcc75d9..2c3aaeb 100644 >>> --- a/builtin/gc.c >>> +++ b/builtin/gc.c >>> @@ -43,9

Re: [PATCH 08/67] add reentrant variants of sha1_to_hex and find_unique_abbrev

2015-09-16 Thread Johannes Schindelin
Hi Junio, Jeff & Ramsay, On 2015-09-16 03:32, Junio C Hamano wrote: > Jeff King writes: > >>> Hmm, I haven't read any other patches yet (including those which use these >>> new '_to' functions), but I can't help feeling they should be named >>> something >>> like

Re: [PATCH 07/67] strbuf: make strbuf_complete_line more generic

2015-09-16 Thread Jeff King
On Tue, Sep 15, 2015 at 06:27:49PM -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > >> +static inline void strbuf_complete(struct strbuf *sb, char term) > >> +{ > >> + if (sb->len && sb->buf[sb->len - 1] != term) > >> + strbuf_addch(sb,

Re: [PATCH 10/67] mailsplit: make PATH_MAX buffers dynamic

2015-09-16 Thread Jeff King
On Tue, Sep 15, 2015 at 08:51:26PM -0400, Eric Sunshine wrote: > > if (strbuf_getwholeline(, f, '\n')) { > > - error("cannot read mail %s (%s)", file, > > strerror(errno)); > > + error("cannot read mail %s (%s)", file.buf, > >

Re: [PATCH 10/67] mailsplit: make PATH_MAX buffers dynamic

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 06:14:18AM -0400, Jeff King wrote: > I guess we could get away with always calling free() right before > assigning (the equivalent of strbuf_reset()), and then rely on exiting > the loop to "out" to do the final free. And then the result (versus the > original code, not my

Re: [PATCH 08/67] add reentrant variants of sha1_to_hex and find_unique_abbrev

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 10:15:02AM +0200, Johannes Schindelin wrote: > Maybe we should stick to the established practice of the many, many > reentrant POSIX functions following the *_r() naming convention? I.e. > the reentrant version of localtime() is called localtime_r(), the > reentrant

Re: [PATCH 0/67] war on sprintf, strcpy, etc

2015-09-16 Thread Jeff King
On Tue, Sep 15, 2015 at 06:54:28PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Obviously this is not intended for v2.6.0. But all of the spots touched > > here are relatively quiet right now, so I wanted to get it out onto the > > list. There are a few minor conflicts

Re: git-svn: cat-file memory usage

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 04:00:48AM -0700, Victor Leschuk wrote: > * git svn clone of trac takes about 1 hour > * git svn clone of FreeBSD has already taken more than 3 days and > still running (currently has cloned about 40% of revisions) I haven't worked with git-svn in a long time, but I

Re: [PATCH v5 6/7] git-p4: add support for large file systems

2015-09-16 Thread Lars Schneider
On 16 Sep 2015, at 10:36, Luke Diamand wrote: > On 14/09/15 14:26, larsxschnei...@gmail.com wrote: >> From: Lars Schneider >> >> Perforce repositories can contain large (binary) files. Migrating these >> repositories to Git generates very large

[PATCH v2] git-p4: improve path encoding verbose output

2015-09-16 Thread larsxschneider
From: Lars Schneider Follow up patch for a9e38359 (git-p4: add config git-p4.pathEncoding, 2015-09-03) which is already on 'next'. diff to v1 (wrongly called v7 in "[PATCH v7] git-p4: add config git-p4.pathEncoding") * make path encoding for utf-8 default case more

Re: [PATCH 29/67] use strip_suffix and xstrfmt to replace suffix

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 12:38:12AM -0400, Eric Sunshine wrote: > > @@ -1524,9 +1525,9 @@ int finish_http_pack_request(struct http_pack_request > > *preq) > > lst = &((*lst)->next); > > *lst = (*lst)->next; > > > > - tmp_idx = xstrdup(preq->tmpfile); > > -

git-svn: cat-file memory usage

2015-09-16 Thread Victor Leschuk
Hello all, We are currently getting acquainted with git-svn tool and have experienced few problems with it. The main issue is memory usage during "git svn clone": on large repositories the perl and git processes are using significant amount of memory. I have conducted several tests with

Re: [PATCH 11/67] trace: use strbuf for quote_crnl output

2015-09-16 Thread Jeff King
On Tue, Sep 15, 2015 at 08:55:58PM -0400, Eric Sunshine wrote: > On Tue, Sep 15, 2015 at 11:28 AM, Jeff King wrote: > > When we output GIT_TRACE_SETUP paths, we quote any > > meta-characters. But our buffer to hold the result is only > > PATH_MAX bytes, and we could double the

Re: [PATCH 26/67] replace trivial malloc + sprintf /strcpy calls to xstrfmt

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 12:24:38AM -0400, Eric Sunshine wrote: > On Tue, Sep 15, 2015 at 11:45 AM, Jeff King wrote: > > replace trivial malloc + sprintf /strcpy calls to xstrfmt > > s/to/with/ > > Also, do you want either to add a space after '/' or drop the one before it?

Re: [PATCH v2 2/2] git-p4: handle "Translation of file content failed"

2015-09-16 Thread Lars Schneider
On 16 Sep 2015, at 00:12, Luke Diamand wrote: > On 15/09/15 16:38, Lars Schneider wrote: >> >> On 15 Sep 2015, at 08:43, Luke Diamand wrote: >> > > >>> Do we know the mechanism by which we end up in this state? >> Unfortunately no. I tried hard to

RE: git-svn: cat-file memory usage

2015-09-16 Thread Victor Leschuk
Hello Jeff, thanks for the advice. Unfortunately using patch didn't change the situation. I will run some tests with alternate allocators (looking at jemalloc and tcmalloc). As for alternate tools: as far as I understood svn2git calls 'git svn' itself. So I assume it can't fix the memory usage

Re: [PATCH v5 6/7] git-p4: add support for large file systems

2015-09-16 Thread Eric Sunshine
On Wed, Sep 16, 2015 at 02:05:40PM +0200, Lars Schneider wrote: > On 16 Sep 2015, at 10:36, Luke Diamand wrote: > > On 14/09/15 14:26, larsxschnei...@gmail.com wrote: > >> +test_file_in_mock () { > >> + FILE="$1" > > Missing && > > Plus the next few lines > Are they strictly

Re: [PATCH 07/67] strbuf: make strbuf_complete_line more generic

2015-09-16 Thread Eric Sunshine
On Wed, Sep 16, 2015 at 05:57:41AM -0400, Jeff King wrote: > On Tue, Sep 15, 2015 at 06:27:49PM -0700, Junio C Hamano wrote: > > Eric Sunshine writes: > > >> +static inline void strbuf_complete(struct strbuf *sb, char term) > > >> +{ > > >> + if (sb->len &&

Re: [PATCH 11/67] trace: use strbuf for quote_crnl output

2015-09-16 Thread Eric Sunshine
On Wed, Sep 16, 2015 at 06:31:14AM -0400, Jeff King wrote: > On Tue, Sep 15, 2015 at 08:55:58PM -0400, Eric Sunshine wrote: > > On Tue, Sep 15, 2015 at 11:28 AM, Jeff King wrote: > > > static const char *quote_crnl(const char *path) > > > { > > > - static char

Re: [PATCH 29/67] use strip_suffix and xstrfmt to replace suffix

2015-09-16 Thread Eric Sunshine
On Wed, Sep 16, 2015 at 06:50:38AM -0400, Jeff King wrote: > On Wed, Sep 16, 2015 at 12:38:12AM -0400, Eric Sunshine wrote: > > > @@ -1524,9 +1525,9 @@ int finish_http_pack_request(struct > > > http_pack_request *preq) > > > lst = &((*lst)->next); > > > *lst =

Re: [PATCH v5 6/7] git-p4: add support for large file systems

2015-09-16 Thread Junio C Hamano
Lars Schneider writes: >>> +git-p4.largeFileSystem:: >>> + Specify the system that is used for large (binary) files. Please note >>> + that large file systems do not support the 'git p4 submit' command. >> >> Why is that? Is it just that you haven't implemented

Re: [PATCH v4] gc: save log from daemonized gc --auto and print it next time

2015-09-16 Thread Junio C Hamano
Michael Haggerty writes: > I'm not sure what behavior you want. At one point you say "puts the file > to a final place if it is non-empty" but later you say "leave it if > non-empty". Should the file be written directly, or should it be written > to a lockfile and renamed

Re: [PATCH 08/67] add reentrant variants of sha1_to_hex and find_unique_abbrev

2015-09-16 Thread Junio C Hamano
Jeff King writes: > On Wed, Sep 16, 2015 at 10:15:02AM +0200, Johannes Schindelin wrote: > >> Maybe we should stick to the established practice of the many, many >> reentrant POSIX functions following the *_r() naming convention? I.e. >> the reentrant version of localtime() is

Re: What's cooking in git.git (Sep 2015, #03; Mon, 14)

2015-09-16 Thread Junio C Hamano
"Philip Oakley" writes: > Oops.. > ... >> Shall I just rework/resend the V2 patch-up ($gmane/277829) that also >> links to 'merge's' usage as a fresh patch (would be tonight UK)? > > I now see that the full V2 patch is already there at 4934a96. OK. I was wondering what I

Re: git-svn: cat-file memory usage

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 06:40:23AM -0700, Victor Leschuk wrote: > Unfortunately using patch didn't change the situation. I will run some > tests with alternate allocators (looking at jemalloc and tcmalloc). As > for alternate tools: as far as I understood svn2git calls 'git svn' > itself. So I

Re: [PATCH 04/67] fsck: don't fsck alternates for connectivity-only check

2015-09-16 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Peff, > > On 2015-09-15 17:24, Jeff King wrote: >> Commit 02976bf (fsck: introduce `git fsck --connectivity-only`, >> 2015-06-22) recently gave fsck an option to perform only a >> subset of the checks, by skipping the fsck_object_dir()

Re: [PATCH 04/67] fsck: don't fsck alternates for connectivity-only check

2015-09-16 Thread Eric Sunshine
On Wed, Sep 16, 2015 at 3:12 PM, Junio C Hamano wrote: > Jeff King writes: > >> Speaking of which, how do you want the next round of patches? I'm >> hesitant to spam the list with 67 patches again, when only a fraction >> have changed (and for all but the _to/_r

Re: [PATCH 04/67] fsck: don't fsck alternates for connectivity-only check

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 11:04:49AM -0700, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Hi Peff, > > > > On 2015-09-15 17:24, Jeff King wrote: > >> Commit 02976bf (fsck: introduce `git fsck --connectivity-only`, > >> 2015-06-22) recently gave fsck an

Re: Git configure/make does not honor ARFLAGS

2015-09-16 Thread Eric Sunshine
On Sun, Sep 13, 2015 at 10:52:36PM -0700, Junio C Hamano wrote: > On Sun, Sep 13, 2015 at 9:59 PM, Jeff King wrote: > > > > My follow-up question was going to be: is this something we should be > > setting in config.mak.uname for appropriate versions of Darwin? It > > wasn't clear

Re: [PATCH] l10n: de.po: translate 2 messages

2015-09-16 Thread Phillip Sz
Acked-by: Phillip Sz > Signed-off-by: Ralf Thielow > --- > po/de.po | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/po/de.po b/po/de.po > index e5b523d..c9b4d16 100644 > --- a/po/de.po > +++ b/po/de.po > @@

Re: [PATCH 04/67] fsck: don't fsck alternates for connectivity-only check

2015-09-16 Thread Junio C Hamano
Jeff King writes: > Speaking of which, how do you want the next round of patches? I'm > hesitant to spam the list with 67 patches again, when only a fraction > have changed (and for all but the _to/_r thing, I've posted my changes > already). Cannot tell yet, as I am only halfway

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Junio C Hamano
Jeff King writes: > I think a core file is even more useful than a backtrace. Having BUG() > call abort() would be even more useful, I think. Sounds like a plan ;-) Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: [PATCH 23/67] add_packed_git: convert strcpy into xsnprintf

2015-09-16 Thread Junio C Hamano
Jeff King writes: > + alloc = path_len + strlen(".pack") + 1; > + p = alloc_packed_git(alloc); > + memcpy(p->pack_name, path, path_len); /* NUL from zero-ed struct */ This comment is confusing, isn't it? Yes, there is a NUL, but you will going to overwrite it with

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Stefan Beller
On Wed, Sep 16, 2015 at 12:07 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Wed, Sep 16, 2015 at 11:24:27AM -0700, Junio C Hamano wrote: >> >>> Jeff King writes: >>> >>> > On Tue, Sep 15, 2015 at 11:19:21PM -0400, Eric Sunshine wrote: >>>

Re: [PATCH 04/67] fsck: don't fsck alternates for connectivity-only check

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 03:14:24PM -0400, Eric Sunshine wrote: > On Wed, Sep 16, 2015 at 3:12 PM, Junio C Hamano wrote: > > Jeff King writes: > > > >> Speaking of which, how do you want the next round of patches? I'm > >> hesitant to spam the list with 67

git rebase -i failing due to phantom index.lock

2015-09-16 Thread Giuseppe Bilotta
Hello all, I've recently started to note an issue with git rebase -i failing with alarming frequency, especially on one of my repositories, claiming that index.lock could not be created because it exists, even though it doesn't and nothing else seems to be locking the index. The rebase bombs more

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Junio C Hamano
Jeff King writes: > On Wed, Sep 16, 2015 at 11:24:27AM -0700, Junio C Hamano wrote: > >> Jeff King writes: >> >> > On Tue, Sep 15, 2015 at 11:19:21PM -0400, Eric Sunshine wrote: >> > >> >> > strcpy(hexbuf[stage], sha1_to_hex(ce->sha1)); >> >> > -

Re: [PATCH 30/67] ref-filter: drop sprintf and strcpy calls

2015-09-16 Thread Junio C Hamano
Jeff King writes: > The ref-filter code comes from for-each-ref, and inherited a > number of raw sprintf and strcpy calls. These are generally > all safe, as we custom-size the buffers, or are formatting > numbers into sufficiently large buffers. But we can make the > resulting

Re: Git configure/make does not honor ARFLAGS

2015-09-16 Thread Eric Sunshine
On Wed, Sep 16, 2015 at 3:38 PM, Eric Sunshine wrote: > On the other hand, as far as I know, it's *always* safe to replace > 'ar' with 'libtool' on this platform, so we could just do it > unconditionally. > > --- 8< --- > ifeq ($(uname_S),Darwin) > + AR = libtool >

Re: [PATCH 10/67] mailsplit: make PATH_MAX buffers dynamic

2015-09-16 Thread Junio C Hamano
Jeff King writes: > + free(file); > + file = xstrfmt("%s/%s", maildir, list.items[i].string); Repeated pattern makes one wonder if a thin wrapper xstrfmt_to(, "%s/%s", maildir, list.items[i].string); that first frees the existing value and then

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Junio C Hamano
Jeff King writes: > On Tue, Sep 15, 2015 at 11:19:21PM -0400, Eric Sunshine wrote: > >> > strcpy(hexbuf[stage], sha1_to_hex(ce->sha1)); >> > - sprintf(ownbuf[stage], "%o", ce->ce_mode); >> > + xsnprintf(ownbuf[stage],

Re: [PATCH 36/67] remote-ext: simplify git pkt-line generation

2015-09-16 Thread Junio C Hamano
Jeff King writes: > static void send_git_request(int stdin_fd, const char *serv, const char > *repo, > const char *vhost) > { > - size_t bufferspace; > - size_t wpos = 0; > - char *buffer; > + struct strbuf buffer = STRBUF_INIT; > > - /* > - *

Re: [PATCH 23/67] add_packed_git: convert strcpy into xsnprintf

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 11:43:49AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > + alloc = path_len + strlen(".pack") + 1; > > + p = alloc_packed_git(alloc); > > + memcpy(p->pack_name, path, path_len); /* NUL from zero-ed struct */ > > This comment is confusing,

Re: [PATCH 33/67] read_branches_file: replace strcpy with xstrdup

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 12:52:26PM -0700, Junio C Hamano wrote: > > diff --git a/remote.c b/remote.c > > index 5ab0f7f..1b69751 100644 > > --- a/remote.c > > +++ b/remote.c > > @@ -297,7 +297,6 @@ static void read_branches_file(struct remote *remote) > > int n = 1000; > > FILE *f =

Re: [PATCH v7 1/3] worktree: add top-level worktree.c

2015-09-16 Thread Mike Rappazzo
On Wed, Sep 16, 2015 at 4:32 PM, Eric Sunshine wrote: > On Mon, Sep 14, 2015 at 8:20 AM, Mike Rappazzo wrote: >> On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine >> wrote: +struct worktree { + char *path;

[PATCH 2/2] notes: allow non-writable actions on refs outside of refs/notes

2015-09-16 Thread Jacob Keller
From: Jacob Keller Allow non-destructive notes actions which do not require write permission to be performed on refs outside of refs/notes/. The primary advantage of this is to allow fetching remote refs to such location as "refs/remote-notes//foo" and then performing

[PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-16 Thread Jacob Keller
From: Jacob Keller The documentation for --refs says that it will treat unqualified refs as under refs/notes. Current behavior is to prefix refs/notes to all strings that do not start with refs/notes or notes/, resulting in performing actions on refs such as

[PATCH 0/2] notes: allow read only notes actions on refs outside of refs/notes

2015-09-16 Thread Jacob Keller
From: Jacob Keller The primary purpose of this series is to allow fetching remote notes into a namespace such as "refs/remote-notes//foo". Currently, git-notes refuses to operate on refs outside of refs/notes/* including merging from them, listing or showing them. This

Re: [PATCH 66/67] use strbuf_complete to conditionally append slash

2015-09-16 Thread Junio C Hamano
Jeff King writes: > diff --git a/imap-send.c b/imap-send.c > index 01aa227..f5d2b06 100644 > --- a/imap-send.c > +++ b/imap-send.c > @@ -1412,8 +1412,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc) > curl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass); > >

Re: [PATCH 10/67] mailsplit: make PATH_MAX buffers dynamic

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 11:13:37AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > + free(file); > > + file = xstrfmt("%s/%s", maildir, list.items[i].string); > > Repeated pattern makes one wonder if a thin wrapper > > xstrfmt_to(, "%s/%s",

Re: [PATCH v7 1/3] worktree: add top-level worktree.c

2015-09-16 Thread Eric Sunshine
On Mon, Sep 14, 2015 at 8:20 AM, Mike Rappazzo wrote: > On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine > wrote: >>> +struct worktree { >>> + char *path; >>> + char *git_dir; >>> + char *head_ref; >>> + unsigned char

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 12:07:30PM -0700, Junio C Hamano wrote: > > Correct. The original is sane and gcc does the right thing. The question > > is whether some compiler would complain that "stage" is not a constant > > in the sizeof() expression. I don't know if any compiler would do so, > > but

Re: [PATCH v7 2/3] worktree: move/refactor find_shared_symref from branch.c

2015-09-16 Thread Eric Sunshine
On Mon, Sep 14, 2015 at 1:44 PM, Mike Rappazzo wrote: > On Sat, Sep 12, 2015 at 11:19 PM, Eric Sunshine > wrote: >> On Fri, Sep 4, 2015 at 5:39 PM, Michael Rappazzo wrote: >>> + while (!matched && worktree_list) { >>> +

Re: [PATCH 46/67] write_loose_object: convert to strbuf

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 02:27:57PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > - memcpy(buffer, filename, dirlen); > > - strcpy(buffer + dirlen, "tmp_obj_XX"); > > - fd = git_mkstemp_mode(buffer, 0444); > > + strbuf_reset(tmp); > > + strbuf_add(tmp,

Re: [PATCH 52/67] use sha1_to_hex_to() instead of strcpy

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 02:51:13PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > diff --git a/builtin/merge-index.c b/builtin/merge-index.c > > index 1d66111..4ed0a83 100644 > > --- a/builtin/merge-index.c > > +++ b/builtin/merge-index.c > > @@ -9,7 +9,7 @@ static int

Re: [PATCH 36/67] remote-ext: simplify git pkt-line generation

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 01:18:03PM -0700, Junio C Hamano wrote: > > + /* Now go back and fill in the size */ > > + if (buffer.len > 0x) > > die("Request too large to send"); > > + xsnprintf(buffer.buf, buffer.alloc, "%04x", (unsigned)buffer.len); > > So we now write

Re: [PATCH 52/67] use sha1_to_hex_to() instead of strcpy

2015-09-16 Thread Junio C Hamano
Jeff King writes: > diff --git a/builtin/merge-index.c b/builtin/merge-index.c > index 1d66111..4ed0a83 100644 > --- a/builtin/merge-index.c > +++ b/builtin/merge-index.c > @@ -9,7 +9,7 @@ static int merge_entry(int pos, const char *path) > { > int found; > const char

Re: [PATCH v7 1/3] worktree: add top-level worktree.c

2015-09-16 Thread Eric Sunshine
On Mon, Sep 14, 2015 at 1:41 PM, Junio C Hamano wrote: > Mike Rappazzo writes: >> On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine >> wrote: +struct worktree_list *get_worktree_list() >>> >>> Can we be more concise and call

Re: [PATCH v7 2/3] worktree: move/refactor find_shared_symref from branch.c

2015-09-16 Thread Mike Rappazzo
On Wed, Sep 16, 2015 at 5:09 PM, Eric Sunshine wrote: > On Mon, Sep 14, 2015 at 1:44 PM, Mike Rappazzo wrote: >> On Sat, Sep 12, 2015 at 11:19 PM, Eric Sunshine >> wrote: >>> On Fri, Sep 4, 2015 at 5:39 PM, Michael Rappazzo

Re: [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-16 Thread Junio C Hamano
Jacob Keller writes: > From: Jacob Keller > > The documentation for --refs says that it will treat unqualified refs as > under refs/notes. Current behavior is to prefix refs/notes to all > strings that do not start with refs/notes or notes/,

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 12:19:10PM -0700, Stefan Beller wrote: > > That will make future readers wonder "Is this a typo, and if it is, > > which index is a mistake I can fix?" and may lead to an unnecessary > > confusion. I do not want to see a correctly written > > > >

Re: [PATCH 46/67] write_loose_object: convert to strbuf

2015-09-16 Thread Junio C Hamano
Jeff King writes: > - memcpy(buffer, filename, dirlen); > - strcpy(buffer + dirlen, "tmp_obj_XX"); > - fd = git_mkstemp_mode(buffer, 0444); > + strbuf_reset(tmp); > + strbuf_add(tmp, filename, dirlen); > + strbuf_addstr(tmp, "tmp_obj_XX"); > +

Re: [PATCH 52/67] use sha1_to_hex_to() instead of strcpy

2015-09-16 Thread Junio C Hamano
Jeff King writes: > I think we can save even more in ownbuf, which holds only octal > modes. That was out of scope for this patch, though. :) Sure. Also the variable is misnamed. It is modebuf[], I think. -- To unsubscribe from this list: send the line "unsubscribe git" in the

Re: [PATCH 66/67] use strbuf_complete to conditionally append slash

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 03:54:50PM -0700, Junio C Hamano wrote: > Jeff King writes: > > >> Is this conversion correct? This seems to me that the caller wants > >> to create an IMAP folder name immediately under the root hierarchy > >> and wants to have the leading slash in the

Re: [PATCH 66/67] use strbuf_complete to conditionally append slash

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 03:18:59PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > diff --git a/imap-send.c b/imap-send.c > > index 01aa227..f5d2b06 100644 > > --- a/imap-send.c > > +++ b/imap-send.c > > @@ -1412,8 +1412,7 @@ static CURL *setup_curl(struct imap_server_conf

Re: [PATCH v5] remote: add get-url subcommand

2015-09-16 Thread Junio C Hamano
Ben Boeckel writes: > +get_url_test () { > + cat >expect && > + test_expect_success "get-url $*" " > + git remote get-url $* >actual && > + test_cmp expect actual > + " > +} This makes any use of get_url_test inside test_expect_success

Re: [PATCH 0/2] notes: allow read only notes actions on refs outside of refs/notes

2015-09-16 Thread Mike Hommey
On Wed, Sep 16, 2015 at 03:06:32PM -0700, Jacob Keller wrote: > This topic depends on mh/notes-allow-reading-treeish and actually > expands what this topic allowed before. Previously, treeishes such as > notes@{1} were made allowable, but the ref still had to be found under > refs/notes. I

Re: [PATCH 0/2] notes: allow read only notes actions on refs outside of refs/notes

2015-09-16 Thread Jacob Keller
On Wed, Sep 16, 2015 at 3:36 PM, Mike Hommey wrote: > On Wed, Sep 16, 2015 at 03:06:32PM -0700, Jacob Keller wrote: >> This topic depends on mh/notes-allow-reading-treeish and actually >> expands what this topic allowed before. Previously, treeishes such as >> notes@{1} were

Re: [PATCH 00/43] refs lmdb backend

2015-09-16 Thread David Turner
On Fri, 2015-09-04 at 12:01 -0400, David Turner wrote: > On Thu, 2015-09-03 at 16:10 -0700, Junio C Hamano wrote: > > David Turner writes: > > > > > I think I've broken about all of the standalone stuff out, so here's > > > the main enchilada. > > > > > > This series

Re: [PATCH 1/2] notes: don't expand qualified refs in expand_notes_ref

2015-09-16 Thread Jacob Keller
On Wed, Sep 16, 2015 at 3:34 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> From: Jacob Keller >> >> The documentation for --refs says that it will treat unqualified refs as >> under refs/notes. Current behavior is to

[PATCH 01/10] strbuf: Add strbuf_read_noblock

2015-09-16 Thread Stefan Beller
We need to read from pipes without blocking in a later patch. Signed-off-by: Stefan Beller --- strbuf.c | 25 +++-- strbuf.h | 6 ++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/strbuf.c b/strbuf.c index cce5eed..4130ee2 100644 ---

[PATCH 00/10] fetch submodules in parallel and a preview on parallel "submodule update"

2015-09-16 Thread Stefan Beller
> I didn't say this in the previous round because it smelled like an > RFC, but for a real submission, 2/2 may be doing too many things at > once. I suspect this is more or less "taste" thing, so I won't mind > too much as long as the reviewers are OK with it. The patch 2/2 is now broken up into

[PATCH 02/10] run-command: factor out return value computation

2015-09-16 Thread Stefan Beller
We will need computing the return value in a later patch without the wait. Signed-off-by: Stefan Beller --- run-command.c | 54 -- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/run-command.c

[PATCH 04/10] fetch_populated_submodules: use new parallel job processing

2015-09-16 Thread Stefan Beller
In a later patch we enable parallel processing of submodules, this only adds the possibility for it. So this change should not change any user facing behavior. Signed-off-by: Stefan Beller --- builtin/fetch.c | 3 +- submodule.c | 119

[PATCH 09/10] git submodule update: cmd_update_recursive

2015-09-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 52c2967..c40d60f 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -607,6

[PATCH 07/10] git submodule update: pass --prefix only with a non empty prefix

2015-09-16 Thread Stefan Beller
We should not pass --prefix NULL into the helper. Although the helper can deal with it, it's just messy. Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index

Re: [PATCH 66/67] use strbuf_complete to conditionally append slash

2015-09-16 Thread Junio C Hamano
Jeff King writes: >> Is this conversion correct? This seems to me that the caller wants >> to create an IMAP folder name immediately under the root hierarchy >> and wants to have the leading slash in the result. > > Ugh, you're right. This is the "other" style Eric mentioned

[PATCH v6] remote: add get-url subcommand

2015-09-16 Thread Ben Boeckel
Expanding `insteadOf` is a part of ls-remote --url and there is no way to expand `pushInsteadOf` as well. Add a get-url subcommand to be able to query both as well as a way to get all configured urls. Signed-off-by: Ben Boeckel --- Documentation/git-remote.txt | 10

[PATCH 03/10] run-command: add an asynchronous parallel child processor

2015-09-16 Thread Stefan Beller
This allows to run external commands in parallel with ordered output on stderr. If we run external commands in parallel we cannot pipe the output directly to the our stdout/err as it would mix up. So each process's output will flow through a pipe, which we buffer. One subprocess can be directly

[PATCH 10/10] git submodule update: cmd_update_fetch

2015-09-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- git-submodule.sh | 164 --- 1 file changed, 84 insertions(+), 80 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index c40d60f..2c9f1f2 100755 --- a/git-submodule.sh +++

[PATCH 05/10] submodules: Allow parallel fetching, add tests and documentation

2015-09-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Documentation/fetch-options.txt | 7 +++ builtin/fetch.c | 5 - builtin/pull.c | 6 ++ t/t5526-fetch-submodules.sh | 19 +++ 4 files changed, 36 insertions(+), 1 deletion(-)

[PATCH 06/10] git submodule update: Redirect any output to stderr

2015-09-16 Thread Stefan Beller
There are no tests, which fail by this. Signed-off-by: Stefan Beller --- git-submodule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 8b0eb9a..7ef3247 100755 --- a/git-submodule.sh +++ b/git-submodule.sh

[PATCH 08/10] git submodule update: cmd_update_recursive

2015-09-16 Thread Stefan Beller
split the recursion part out to its own function Signed-off-by: Stefan Beller --- git-submodule.sh | 47 ++- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 3ccb0b6..52c2967

Re: [PATCH 17/67] use xsnprintf for generating git object headers

2015-09-16 Thread Junio C Hamano
Jeff King writes: > We generally use 32-byte buffers to format git's "type size" > header fields. These should not generally overflow unless > you can produce some truly gigantic objects (and our types > come from our internal array of constant strings). But it is > a good idea to

Re: [PATCH 15/67] convert trivial sprintf / strcpy calls to xsnprintf

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 11:24:27AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Tue, Sep 15, 2015 at 11:19:21PM -0400, Eric Sunshine wrote: > > > >> > strcpy(hexbuf[stage], sha1_to_hex(ce->sha1)); > >> > - sprintf(ownbuf[stage], "%o",

Re: [PATCH 33/67] read_branches_file: replace strcpy with xstrdup

2015-09-16 Thread Junio C Hamano
Jeff King writes: > This code is exactly replicating strdup, so let's just use > that. It's shorter, and eliminates some confusion (such as > whether "p - s" is really enough to hold the result; it is, > because we write NULs as we shrink "p"). > > Signed-off-by: Jeff King

Re: [PATCH 08/67] add reentrant variants of sha1_to_hex and find_unique_abbrev

2015-09-16 Thread Jeff King
On Wed, Sep 16, 2015 at 10:06:10AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Wed, Sep 16, 2015 at 10:15:02AM +0200, Johannes Schindelin wrote: > > > >> Maybe we should stick to the established practice of the many, many > >> reentrant POSIX functions following the

[PATCH] l10n: de.po: translate 2 messages

2015-09-16 Thread Ralf Thielow
Translate 2 messages came from git.pot update in e447091 (l10n: git.pot: v2.6.0 round 2 (3 improvements)). Signed-off-by: Ralf Thielow --- po/de.po | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/po/de.po b/po/de.po index e5b523d..c9b4d16 100644

Re: [Feature Request] git blame showing only revisions from git rev-list --first-parent

2015-09-16 Thread Jeff King
On Tue, Sep 15, 2015 at 06:14:26PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > It seems like nobody is actually that interested in what "blame > > --first-parent --reverse" does in the first place, though, and there's > > no reason for its complexity to hold up vanilla