Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Wed, Jun 01, 2016 at 07:48:12AM +0200, Johannes Sixt wrote: > Am 01.06.2016 um 05:31 schrieb Jeff King: > > printf '%s' "$1" | sed "s/'/'''/g" > ... > > export -p | grep "^declare -x $1=" > ... > > "$fake_env_var_=$(shellquote > >

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Johannes Sixt
Am 01.06.2016 um 05:31 schrieb Jeff King: printf '%s' "$1" | sed "s/'/'''/g" ... export -p | grep "^declare -x $1=" ... "$fake_env_var_=$(shellquote "$fake_env_orig_")" ... eval

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Wed, Jun 01, 2016 at 01:33:25AM -0400, Jeff King wrote: > Here is the "final" version of the more complicated scheme I came up > with. That I think should be fairly portable, but the subshell thing is > probably way less gross. OK, last email tonight, I promise. Here's the subshell version.

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 11:44:13PM -0400, Jeff King wrote: > So this is gross, but I think it actually _is_ portable, with the > exception of the "is it exported" check. Hmm. So after thinking on this, I realized we don't have to do the clean-up ourselves at all, if we simply operate in a

Re: [PATCH 2/2] completion: add git status

2016-05-31 Thread Jeff King
On Wed, Jun 01, 2016 at 01:42:18AM +0200, Thomas Braun wrote: > Signed-off-by: Thomas Braun > --- > contrib/completion/git-completion.bash | 29 + > 1 file changed, 29 insertions(+) > > diff --git

Re: [PATCH 1/2] completion: create variable for untracked file modes

2016-05-31 Thread Jeff King
On Wed, Jun 01, 2016 at 01:42:33AM +0200, Thomas Braun wrote: > Signed-off-by: Thomas Braun > --- > contrib/completion/git-completion.bash | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/contrib/completion/git-completion.bash >

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 11:44:13PM -0400, Jeff King wrote: > # probably not portable; also, possible without sub-program? > is_exported () { > export -p | grep "^declare -x $1=" > } Obviously this should have been "grep -q" (and my test didn't notice because the variable isn't actually

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 11:31:40PM -0400, Jeff King wrote: > I wondered if we could implement our own "env" in the shell, but it's a > little non-trivial, because: > [...] > Here's what I came up with, which does seem to work. It's pretty gnarly, > though. Here's a revised version that drops the

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 10:31:59PM -0400, Jeff King wrote: > On Tue, May 31, 2016 at 08:09:43PM -0400, Eric Sunshine wrote: > > > I was under the impression that the project was moving toward 'env' to > > deal[1] with this sort of issue. > > > > [1]: 512477b (tests: use "env" to run commands

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 08:09:43PM -0400, Eric Sunshine wrote: > >> - GIT_AUTHOR_NAME="éxötìc" test_commit exotic && > >> + (export GIT_AUTHOR_NAME="éxötìc"; test_commit exotic) && > > Isn't "export FOO=val" unportable? Good catch. I was so busy looking for other cases I didn't even see

[PATCH] submodule: remove bashism from shell script

2016-05-31 Thread Stefan Beller
Junio pointed out `relative_path` was using bashisms via the local variables. As the longer term goal is to rewrite most of the submodule code in C, do it now. Signed-off-by: Stefan Beller --- * developed on top of origin/master + "[PATCH] submodule--helper: offer a

Re: [PATCH 12/13] dir_iterator: new API for iterating over a directory tree

2016-05-31 Thread David Turner
On Mon, 2016-05-30 at 09:55 +0200, Michael Haggerty wrote: > +struct dir_iterator_level { > + int initialized; > + > + DIR *dir; > + > + /* > + * The length of the directory part of refname at this level "refname"? Isn't this was for directories? > + if

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 6:56 PM, Jeff King wrote: > On Tue, May 31, 2016 at 03:53:15PM -0700, Junio C Hamano wrote: >> One-shot assignment to an environment variable, i.e. >> >> VAR=VAL cmd >> >> does not work as expected for "cmd" that is a shell function on >> certain

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Ramsay Jones
On 31/05/16 23:53, Junio C Hamano wrote: > One-shot assignment to an environment variable, i.e. > > VAR=VAL cmd > > does not work as expected for "cmd" that is a shell function on > certain shells. test_commit _is_ a helper function and cannot be > driven that way portably. > >

[PATCH 1/2] completion: create variable for untracked file modes

2016-05-31 Thread Thomas Braun
Signed-off-by: Thomas Braun --- contrib/completion/git-completion.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 3402475..57a0acc 100644 ---

[PATCH 0/2] completion: add git status

2016-05-31 Thread Thomas Braun
Hi, I was suprised to learn that git status does not get completed for bash. So I thought this has to change, see the following patches. Thomas Braun (2): completion: create variable for untracked file modes completion: add git status contrib/completion/git-completion.bash | 33

[PATCH 2/2] completion: add git status

2016-05-31 Thread Thomas Braun
Signed-off-by: Thomas Braun --- contrib/completion/git-completion.bash | 29 + 1 file changed, 29 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 57a0acc..96b7d86

[PATCH] submodule--helper: offer a consistent API

2016-05-31 Thread Stefan Beller
In 48308681 (2016-02-29, git submodule update: have a dedicated helper for cloning), the helper communicated errors back only via exit code, and dance with printing '#unmatched' in case of error was left to git-submodule.sh as it uses the output of the helper and pipes it into shell commands. This

Re: [PATCH] t0005: ksh93 portability workaround

2016-05-31 Thread Junio C Hamano
Jeff King writes: > Hmm. We discussed these back in: > > http://thread.gmane.org/gmane.comp.version-control.git/268657 > > but I thought we decided not to do anything about them (according to > that thread, I found a bunch of other ksh93 oddities, but maybe we've > since fixed

Re: [BUG] git-submodule has bash-ism?

2016-05-31 Thread Stefan Beller
On Tue, May 31, 2016 at 4:08 PM, Junio C Hamano wrote: > relative_path () > { > local target curdir result > target=$1 > curdir=${2-$wt_prefix} > > I am hoping that Stefan's "gradually rewrite things in C" will make > it unnecessary to worry about this

Re: [PATCH 09/13] refs: introduce an iterator interface

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 3:59 AM, Michael Haggerty wrote: > On 05/31/2016 07:29 AM, Eric Sunshine wrote: >> On Mon, May 30, 2016 at 3:55 AM, Michael Haggerty >> wrote: >>> +struct ref_iterator *empty_ref_iterator_begin(void); >>> + >>> +/* >>> + *

[BUG] git-submodule has bash-ism?

2016-05-31 Thread Junio C Hamano
relative_path () { local target curdir result target=$1 curdir=${2-$wt_prefix} I am hoping that Stefan's "gradually rewrite things in C" will make it unnecessary to worry about this one. "git submodule" would not work correctly on posixly correct shells in the meantime.

Re: [PATCH] t/lib-git-daemon: ksh portability workaround

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 04:04:00PM -0700, Junio C Hamano wrote: > The "git daemon" test checks with what status the daemon exits when > we terminate it, and we expect that we can observe death by SIGTERM. > > We forgot that ksh adds 256, unlike 128 that are used by other POSIX > shells, to the

[PATCH] t/lib-git-daemon: ksh portability workaround

2016-05-31 Thread Junio C Hamano
The "git daemon" test checks with what status the daemon exits when we terminate it, and we expect that we can observe death by SIGTERM. We forgot that ksh adds 256, unlike 128 that are used by other POSIX shells, to the signal number that caused the process to die when coming up with the exit

Re: [PATCH] t0005: ksh93 portability workaround

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 03:47:01PM -0700, Junio C Hamano wrote: > The test has two things ksh93 does not happy about: > > * It thinks "(( command1; command2 ) | command3)" is a perfectly >sane way to write a pipeline. ksh93, unlike other POSIX shells, >does not like the two open

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 03:53:15PM -0700, Junio C Hamano wrote: > One-shot assignment to an environment variable, i.e. > > VAR=VAL cmd > > does not work as expected for "cmd" that is a shell function on > certain shells. test_commit _is_ a helper function and cannot be > driven that way

[PATCH] t4014: shell portability fix

2016-05-31 Thread Junio C Hamano
One-shot assignment to an environment variable, i.e. VAR=VAL cmd does not work as expected for "cmd" that is a shell function on certain shells. test_commit _is_ a helper function and cannot be driven that way portably. Signed-off-by: Junio C Hamano ---

Re: [PATCH] t0005: ksh93 portability workaround

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 6:47 PM, Junio C Hamano wrote: > The test has two things ksh93 does not happy about: s/does/is/ > * It thinks "(( command1; command2 ) | command3)" is a perfectly >sane way to write a pipeline. ksh93, unlike other POSIX shells, >does not like

[PATCH] t0005: ksh93 portability workaround

2016-05-31 Thread Junio C Hamano
The test has two things ksh93 does not happy about: * It thinks "(( command1; command2 ) | command3)" is a perfectly sane way to write a pipeline. ksh93, unlike other POSIX shells, does not like the two open parentheses next to each other for whatever reason it has. * It adds 256,

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-05-31 Thread Jeff King
On Fri, May 20, 2016 at 02:39:06PM +0200, Christian Couder wrote: > I wonder if this mechanism could also be used or extended to clone and > fetch an alternate object database. > > In [1], [2] and [3], and this was also discussed during the > Contributor Summit last month, Peff says that he

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 07:43:27PM +0700, Duy Nguyen wrote: > > [3] > > http://thread.gmane.org/gmane.comp.version-control.git/202902/focus=203020 > > This points to https://github.com/peff/git/commits/jk/external-odb > which is dead. Jeff, do you still have it somewhere, or is it not > worth

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 07:23:32PM +0700, Duy Nguyen wrote: > I think the (old) "auto" here means "automatically select the > color" and what you do would be equivalent to %(auto,auto) where the > first (and new) "auto" is about on/off switch, and the second is about > selecting the actual color.

What's cooking in git.git (May 2016, #09; Tue, 31)

2016-05-31 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. 2.9-rc1 has been tagged. There

Re: git gc and worktrees

2016-05-31 Thread Jeff King
On Tue, May 31, 2016 at 07:02:15PM +0700, Duy Nguyen wrote: > On Tue, May 31, 2016 at 2:07 PM, Johannes Sixt wrote: > > Earlier this year I had a largish merge going on in a separate worktree. > > With a mix of staged resolutions and unmerged paths in the index, I ran 'git > > gc'

[PATCH] add: add --chmod=+x / --chmod=-x options

2016-05-31 Thread Edward Thomson
The executable bit will not be detected (and therefore will not be set) for paths in a repository with `core.filemode` set to false, though the users may still wish to add files as executable for compatibility with other users who _do_ have `core.filemode` functionality. For example, Windows

Re: [PATCH] add: add --chmod=+x / --chmod=-x options

2016-05-31 Thread Edward Thomson
On Fri, May 27, 2016 at 11:30:40AM -0700, Junio C Hamano wrote: > > Oh, having said all of that, the comments on the implementation > still stand. Certainly; sorry for the delay. I've squashed in your tests and applied your recommendations. Resending the patch momentarily. Thanks- -ed -- To

[ANNOUNCE] Git v2.9.0-rc1

2016-05-31 Thread Junio C Hamano
A release candidate Git v2.9.0-rc1 is now available for testing at the usual places. It is comprised of 462 non-merge commits since v2.8.0, contributed by 63 people, 24 of which are new faces. There still are a few topics yet to be merged to 'master' for the upcoming release, but otherwise this

Re: [PATCH v3 2/3] perf: make the tests work in worktrees

2016-05-31 Thread Junio C Hamano
René Scharfe writes: >>> I fear that interacts badly with the `cd "$repo"` I introduced later >>> (replacing a `cd ..`)... > > Oh, right, it does if $repo is a relative path. > >> What do you want to do then? For now before -rc1 we can revert the >> whole thing so that we can get

Re: [PATCH v2.5 1/8] t4051: rewrite, add more tests

2016-05-31 Thread Junio C Hamano
Thanks. -- 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/RFC 0/4] Add option to enable filters in git-svn

2016-05-31 Thread Matteo Bertini
Il 2016-05-31 20:12 Eric Wong ha scritto: Matteo Bertini wrote: Sorry to all, but I missed a Checksum mismatch error, I'll have a look and submit an update. I've had a look, the problem is a missing smudge filter. Unluckily the small svn revision range i was using was

Re: Gitweb: Persistant download URLs for snapshots?

2016-05-31 Thread Timo Sigurdsson
Hi again, Timo Sigurdsson schrieb am 30.05.2016 16:12: > Hi, > > I hope this is the right place to ask this, but I wanted to know whether it is > possible to have a persistant URL to obtain a snapshot of the latest master of > a repository through Gitweb. > > I set up a gitweb instance and it

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 4:12 PM, Eric Sunshine wrote: > On reflection, even with the '^' anchor, it isn't safe the way it's > coded since '^' will match following a newline, won't it? Therefore, > because 'line' isn't necessarily NUL-terminated, the pattern could > match

Re: [PATCH v2.5 1/8] t4051: rewrite, add more tests

2016-05-31 Thread René Scharfe
Interdiff between v2 and v2.5: - Rename $message to $tag, as that fits its purpose better, and quote it. - Quote $@. - Use the most common sed invocation from t/ for getting the last line of a file, for consistency. - Use apply --index to make sure we notice if the generated diff adds or

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 2:29 PM, Eric Wong wrote: > Eric Sunshine wrote: >> On Tue, May 31, 2016 at 3:45 AM, Eric Wong wrote: >> > Eric Sunshine wrote: > Ah thanks, I can see your point-of-view, now. > I always

[PATCH v2.5 1/8] t4051: rewrite, add more tests

2016-05-31 Thread René Scharfe
Remove the tests that checked against a fixed result and replace them with more focused checks of desired properties of the created diffs. That way we get more detailed and meaningful diagnostics. Store test file contents in files in a subdirectory in order to avoid cluttering the test script

Re: [PATCH v3 6/6] worktree: add "unlock" command

2016-05-31 Thread Junio C Hamano
Junio C Hamano writes: > Again, this seems to be built on an unseen version. I think I fixed > these up (and also the "missing second colon in the doc"), but please > double check what I push out later today. Ah, this comes on top of 0409e0b6 (worktree: simplify prefixing

Re: [PATCH v3 6/6] worktree: add "unlock" command

2016-05-31 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > Documentation/git-worktree.txt | 5 + > builtin/worktree.c | 28 > contrib/completion/git-completion.bash | 2 +- >

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Wong
Eric Sunshine wrote: > On Tue, May 31, 2016 at 3:45 AM, Eric Wong wrote: > > Eric Sunshine wrote: Ah thanks, I can see your point-of-view, now. I always had the '^' in my mind since I've written the same thing in Perl and

Re: [PATCH v3 5/6] worktree: add "lock" command

2016-05-31 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > @@ -11,6 +11,7 @@ SYNOPSIS > [verse] > 'git worktree add' [-f] [--detach] [--checkout] [-b ] > [] > 'git worktree list' [--porcelain] > +'git worktree lock' [--reason ] > 'git worktree prune' [-n] [-v] [--expire ] This seems to be based

Re: [PATCH v3 6/6] worktree: add "unlock" command

2016-05-31 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > + if (is_main_worktree(wt)) > + die(_("'%s' is a main working directory"), av[0]); > + if (!wt->lock_reason) > + die(_("'%s' is not locked"), av[0]); Exactly the same comment about the lack of need for

Re: [PATCH/RFC 0/4] Add option to enable filters in git-svn

2016-05-31 Thread Eric Wong
Matteo Bertini wrote: > Sorry to all, but I missed a Checksum mismatch error, I'll have a > look and submit an update. Sure, when you reroll can you also ensure lines are wrapped at 80 cols or less? (at least for the git-svn code, but probably for the rest of it, too). As

Re: [PATCH v3 5/6] worktree: add "lock" command

2016-05-31 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/builtin/worktree.c b/builtin/worktree.c > index f9dac37..84fe63b 100644 > --- a/builtin/worktree.c > +++ b/builtin/worktree.c > @@ -14,6 +14,7 @@ > static const char * const worktree_usage[] = { > N_("git worktree add []

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Sunshine
On Tue, May 31, 2016 at 3:45 AM, Eric Wong wrote: > Eric Sunshine wrote: >> On Mon, May 30, 2016 at 7:21 PM, Eric Wong wrote: >> > + if (pp->fmt == CMIT_FMT_MBOXRD && >> > +

Re: [PATCH v3 4/6] worktree.c: retrieve lock status (and optionally reason) in get_worktrees()

2016-05-31 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > We need this later to avoid double locking a worktree, or unlocking one > when it's not even locked. Shouldn't this be done lazily? If a user is working in worktree B and is not doing anything funky, she would not care why worktree A and C are

Re: [PATCH v3 3/6] worktree.c: add is_main_worktree()

2016-05-31 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Main worktree _is_ different. You can lock a linked worktree but not the > main one, for example. Provide an API for checking that. You haven't defined what it means to "lock" a worktree, so that example does not sound convincing at all, until

Re: [PATCH v3 2/6] worktree.c: find_worktree() learns to identify worktrees by basename

2016-05-31 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > This allows the user to do something like "worktree lock foo" instead of > "worktree lock ". With completion support it could be quite > convenient. While this base name search can be done in the same worktree > iteration loop, the code is split

Re: [PATCH v5] upload-pack.c: use parse-options API

2016-05-31 Thread Junio C Hamano
Matthieu Moy writes: > Actually, that's even: don't you want to use a valid email address in > your Signed-off-by: ? ;-) > > @ensimag.grenoble-inp.fr => student's current adress > @grenoble-inp.org => students lifelong address. If not already done, >

Re: [RCF/PATCH] Makefile: move 'ifdef DEVELOPER' after config.mak* inclusion

2016-05-31 Thread Junio C Hamano
Matthieu Moy writes: > The DEVELOPER knob was introduced in 658df95 (add DEVELOPER makefile > knob to check for acknowledged warnings, 2016-02-25), and works well > when used as "make DEVELOPER=1", and when the configure script was not > used. > > However, the advice given

Re: git add without whitespace

2016-05-31 Thread demerphq
On 30 May 2016 at 21:06, Junio C Hamano wrote: > Robert Dailey writes: > >> $ git diff -U0 -w --no-color | git apply --cached --ignore-whitespace >> --unidiff-zero >> >> This command explicitly leaves out context because it can sometimes >> cause the

[PATCH] Documentation: bold literals in man

2016-05-31 Thread Erwan Mathoniere
Backticks are emphasized through monospaced styling in the HTML version of Git documentation. But were left unstyled in the man version. To make the man version reading more comfortable, `MAN_BOLD_LITERAL` was added by: 5121a6d (Documentation: option to render literal text as bold for manpages,

Re: git add without whitespace

2016-05-31 Thread Junio C Hamano
Robert Dailey writes: > - Splitting whitespace & real changes to two commits is probably > superfluous; my original goal was to make diffing the actual changes > easier, but since 'git diff -w' exists this is moot. Doing "whitespace clean-up" in a separate preparatory

Re: [PATCH 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread William Duclot
On Tue, May 31, 2016 at 05:54:59PM +0200, Matthieu Moy wrote: > William writes: > > > On Mon, May 30, 2016 at 11:34:42PM -0700, Junio C Hamano wrote: > > > >> As long as your "on stack strbuf" allows lengthening the string > >> beyond the initial

Re: git add without whitespace

2016-05-31 Thread Christian Neukirchen
Junio C Hamano writes: > Robert Dailey writes: > >> $ git diff -U0 -w --no-color | git apply --cached --ignore-whitespace >> --unidiff-zero >> >> This command explicitly leaves out context because it can sometimes >> cause the patch to fail to apply,

Re: [PATCH 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread William Duclot
On Tue, May 31, 2016 at 06:05:45AM +0200, Michael Haggerty wrote: > On 05/30/2016 02:52 PM, Matthieu Moy wrote: > > [...] > > I feel bad bikeshedding about names, especially since you took some of > the original names from my RFC. But names are very important, so I think > it's worth considering

Re: [PATCH 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread Matthieu Moy
William writes: > On Mon, May 30, 2016 at 11:34:42PM -0700, Junio C Hamano wrote: > >> As long as your "on stack strbuf" allows lengthening the string >> beyond the initial allocation (i.e. .alloc, not .len), the user of >> the API (i.e. the one that

Re: [PATCH] README.md: format CLI commands with code syntax

2016-05-31 Thread Junio C Hamano
Thanks, both.. -- 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 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread William
On Mon, May 30, 2016 at 11:34:42PM -0700, Junio C Hamano wrote: > William Duclot writes: > >> The API contract is still respected: >> >> - The API users may peek strbuf.buf in-place until they perform an >> operation that makes it longer (at which point

Re: [PATCH/RFC 0/4] Add option to enable filters in git-svn

2016-05-31 Thread Matteo Bertini
Sorry to all, but I missed a Checksum mismatch error, I'll have a look and submit an update. Cheers, Matteo -- 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: How to add custom metadata to Git commit object

2016-05-31 Thread Junio C Hamano
Kirill Likhodedov writes: > Just out of curiosity, is it possible to add a custom invisible header > to commit object with some Git command? > git commit or commit-tree don’t have an option for this. There isn't, and that is very much deliberate. We do not

[PATCH 2/4] Git.pm: Add $path and $enable_filters arguments to hash_and_insert_object.

2016-05-31 Thread Matteo Bertini
From: Matteo Bertini The option $enable_filters skips the --no-filters option, the $path argument provide a path to be used alike the --path argument to hash-object in the non streaming invocation. Signed-off-by: Matteo Bertini --- perl/Git.pm | 19

[PATCH/RFC 0/4] Add option to enable filters in git-svn

2016-05-31 Thread Matteo Bertini
=== Description === This is a RFC for a patch that allows to enable filters in the repositories created/managed by git-svn. == Example scenario == The usage scenario I’m facing is the migration of a large SVN repository to a git repository, with

[PATCH 4/4] git-svn.perl: Add git svn init --enable-filters option.

2016-05-31 Thread Matteo Bertini
From: Matteo Bertini The enabled option activates the propagation of the real paths towards hash-object and the removal of the --no-filters option. Signed-off-by: Matteo Bertini --- git-svn.perl | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 1/4] hash-object.c: Allow distinct file/path in stdin mode too.

2016-05-31 Thread Matteo Bertini
From: Matteo Bertini The hash-object command has the --path option to use a name for the filters that is different from the file containing the data. This patch exposes the same functionality for the --stdin-paths, using \t as separator. Signed-off-by: Matteo Bertini

[PATCH 3/4] SVN/Fetcher.pm: Add svn-remote..enable-filters to enable the filters.

2016-05-31 Thread Matteo Bertini
From: Matteo Bertini Given the fact that git-svn uses temporary files to build the index, provide the real $path to hash_and_insert_object if the filters are enabled. Signed-off-by: Matteo Bertini --- perl/Git/SVN/Fetcher.pm | 16

Re: How to add custom metadata to Git commit object

2016-05-31 Thread Kirill Likhodedov
Thanks a lot for your suggestions! > And "the user can use notes for other purposes" is not a good reason > to reject them. The whole point of allowing custom notes ref is so > that Kirill is not restricted to use the usual notes/commits ref to > store this custom notes in its dedicated

Re: [RFC/PATCH] Triangular Workflow UI improvement: Documentation

2016-05-31 Thread Matthieu Moy
[ +Cc Michael Haggerty ] Jordan DE GEA writes: > Currently, Triangular Workflow can be configured, but there is no > Documentation about it. A documentation is useful to keep > configuration possibilities up-to-date. You're using capitalization in a strange way.

[RCF/PATCH] Makefile: move 'ifdef DEVELOPER' after config.mak* inclusion

2016-05-31 Thread Matthieu Moy
The DEVELOPER knob was introduced in 658df95 (add DEVELOPER makefile knob to check for acknowledged warnings, 2016-02-25), and works well when used as "make DEVELOPER=1", and when the configure script was not used. However, the advice given in CodingGuidelines to add DEVELOPER=1 to config.mak

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-05-31 Thread Christian Couder
On Tue, May 31, 2016 at 2:43 PM, Duy Nguyen wrote: > On Fri, May 20, 2016 at 7:39 PM, Christian Couder > wrote: >> I am responding to this 2+ month old email because I am investigating >> adding an alternate object store at the same level as loose

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-05-31 Thread Duy Nguyen
On Fri, May 20, 2016 at 7:39 PM, Christian Couder wrote: > I am responding to this 2+ month old email because I am investigating > adding an alternate object store at the same level as loose and packed > objects. This alternate object store could be used for large

[RFC/PATCH] Triangular Workflow UI improvement: Documentation

2016-05-31 Thread Jordan DE GEA
Currently, Triangular Workflow can be configured, but there is no Documentation about it. A documentation is useful to keep configuration possibilities up-to-date. The new documentation file gittriangularworkflow explains how to configure a triangular workflow. Signed-off-by: Matthieu Moy

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-31 Thread Duy Nguyen
On Thu, May 26, 2016 at 5:39 AM, Jeff King wrote: > On Tue, May 24, 2016 at 08:56:49PM -0500, Edward Thomson wrote: > >> Check that we are configured to display colors in the given context when >> the user specifies a format string of `%C(auto)`. This brings that >> behavior in

Re: [PATCH] contrib/subtree: add repo url to commit messages

2016-05-31 Thread Mathias Nyman
On 2016-05-21 17:52-0500, David A. Greene wrote: Mathias Nyman writes: For recalling where a subtree came from; git-subtree operations 'add' and 'pull', when called with the parameter add this to the commit message: git-subtree-repo: I am sorry it tooks a couple

Re: git gc and worktrees

2016-05-31 Thread Duy Nguyen
On Tue, May 31, 2016 at 2:07 PM, Johannes Sixt wrote: > Earlier this year I had a largish merge going on in a separate worktree. > With a mix of staged resolutions and unmerged paths in the index, I ran 'git > gc' in the main worktree. This removed a lot of objects that were

Re: [PATCH v5] upload-pack.c: use parse-options API

2016-05-31 Thread Matthieu Moy
Junio C Hamano writes: > Antoine Queru writes: > >> From: Antoine Queru >> Signed-off-by: Antoine Queru > > Don't you want to be known to the project as the email

[PATCH v6] upload-pack.c: use parse-options API

2016-05-31 Thread Antoine Queru
Use the parse-options API rather than a hand-rolled option parser. Description for --stateless-rpc and --advertise-refs come from 42526b4 (Add stateless RPC options to upload-pack, receive-pack, 2009-10-30). Signed-off-by: Antoine Queru Signed-off-by:

Re: [PATCH 1/2] strbuf: add tests

2016-05-31 Thread Simon Rabourg
Hi Michael, Michael Haggerty writes: > Hi, > > Cool that you are working on this! See my comments below. > > On 05/30/2016 12:36 PM, William Duclot wrote: > > Test the strbuf API. Being used throughout all Git the API could be > > considered tested, but adding specific

Re: [PATCH v5] upload-pack.c: use parse-options API

2016-05-31 Thread Antoine Queru
Hello Junio, thanks for your answer. The next version (and hopefully the last) will come fast. > > From: Antoine Queru > > Don't you want to be known to the project as the email that matches > your Signed-off-by: line? Thanks for noticing it, it will be

Re: [PATCH 09/13] refs: introduce an iterator interface

2016-05-31 Thread Michael Haggerty
On 05/31/2016 08:10 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> This commit introduces a new iteration primitive for references: a >> ref_iterator. A ref_iterator is a polymorphic object that a reference >> storage backend can be asked to instantiate. There

Re: [PATCH 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread Michael Haggerty
On 05/31/2016 08:41 AM, Johannes Schindelin wrote: > Hi Michael, > > On Tue, 31 May 2016, Michael Haggerty wrote: > >> On 05/30/2016 02:13 PM, Johannes Schindelin wrote: >>> [...] @@ -38,7 +67,11 @@ char *strbuf_detach(struct strbuf *sb, size_t *sz) { char *res;

Re: [PATCH 09/13] refs: introduce an iterator interface

2016-05-31 Thread Michael Haggerty
On 05/31/2016 07:29 AM, Eric Sunshine wrote: > On Mon, May 30, 2016 at 3:55 AM, Michael Haggerty > wrote: >> [...] > [...] > Either: > > s/false/something other than ITER_OK/ > > or: > > s/false/ITER_DONE or ITER_ERROR/ Thanks. >> +int

Re: [PATCH 1/3] pretty: support "mboxrd" output format

2016-05-31 Thread Eric Wong
Eric Sunshine wrote: > On Mon, May 30, 2016 at 7:21 PM, Eric Wong wrote: > > diff --git a/pretty.c b/pretty.c > > @@ -1697,12 +1699,34 @@ static void pp_handle_indent(struct > > pretty_print_context *pp, > > +static regex_t *mboxrd_prepare(void) > > +{ >

git gc and worktrees

2016-05-31 Thread Johannes Sixt
Earlier this year I had a largish merge going on in a separate worktree. With a mix of staged resolutions and unmerged paths in the index, I ran 'git gc' in the main worktree. This removed a lot of objects that were recorded in that separate worktree index. (I was able to recover them because

Re: [PATCH 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread Johannes Schindelin
Hi Michael, On Tue, 31 May 2016, Michael Haggerty wrote: > On 05/30/2016 02:13 PM, Johannes Schindelin wrote: > > [...] > >> @@ -38,7 +67,11 @@ char *strbuf_detach(struct strbuf *sb, size_t *sz) > >> { > >>char *res; > >>strbuf_grow(sb, 0); > >> - res = sb->buf; > >> + if (sb->flags &

Re: Git reset --hard with staged changes

2016-05-31 Thread Christian Couder
On Tue, May 31, 2016 at 8:02 AM, Junio C Hamano wrote: > > diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt > index 25432d9..c4cc035 100644 > --- a/Documentation/git-reset.txt > +++ b/Documentation/git-reset.txt > @@ -65,8 +65,14 @@ If `-N` is specified,

Re: [RFC/PATCH] bisect--helper: `bisect_clean_state` shell function in C

2016-05-31 Thread Pranit Bauva
Hey Michael, On Tue, May 31, 2016 at 9:55 AM, Michael Haggerty wrote: > On 05/30/2016 08:21 PM, Pranit Bauva wrote: >> Reimplement `bisect_clean_state` shell function in C and add a >> `bisect-clean-state` subcommand to `git bisect--helper` to call it from >> git-bisect.sh

Re: [PATCH 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread Junio C Hamano
William Duclot writes: > The API contract is still respected: > > - The API users may peek strbuf.buf in-place until they perform an > operation that makes it longer (at which point the .buf pointer > may point at a new piece of memory). I think the

Re: [RFC/PATCH] bisect--helper: `bisect_clean_state` shell function in C

2016-05-31 Thread Pranit Bauva
Hey Christian, On Tue, May 31, 2016 at 3:18 AM, Christian Couder wrote: > On Mon, May 30, 2016 at 8:21 PM, Pranit Bauva wrote: >> --- >> This patch contains a bug. I have tried to identify the bug and I suppose it >> exists in

Re: [PATCH 2/2] strbuf: allow to use preallocated memory

2016-05-31 Thread Johannes Schindelin
Hi William, On Mon, 30 May 2016, William Duclot wrote: > Johannes Schindelin writes: > > > > When working e.g. with file paths or with dates, strbuf's > > malloc()/free() dance of strbufs can be easily avoided: as > > a sensible initial buffer size is

Re: [PATCH 09/13] refs: introduce an iterator interface

2016-05-31 Thread Junio C Hamano
Michael Haggerty writes: > This commit introduces a new iteration primitive for references: a > ref_iterator. A ref_iterator is a polymorphic object that a reference > storage backend can be asked to instantiate. There are three functions > that can be applied to a

Re: Git reset --hard with staged changes

2016-05-31 Thread Junio C Hamano
Yotam Gingold writes: > I read Junio's enumerations of the situations, and I appreciate that the > current behavior of git reset --hard cannot be changed because of the > many tools that rely on the current behavior. After reading it, I have > modified my proposed

  1   2   >