Re: [RFC/PATCHv2] Documentation: triangular workflow

2016-06-06 Thread Matthieu Moy
"Philip Oakley" writes: > Given that clarification I'd be happier to go with it being one's > 'Publish' repo. > > My initial reticence was because of the association of "publish" with > vanity publishing and other forms of over-sharing and self promotion. > > A clarification/explanation that call

Re: [PATCH 1/4] diff.h: extend "flags" field to 64 bits because we're out of bits

2016-06-06 Thread stefan.naewe
Am 06.06.2016 um 13:16 schrieb Nguyễn Thái Ngọc Duy: > Current flags field is 32-bits, all used except one bit and we need one > more bit is needed for to toggle i-t-a behavior. The 9th bit could be Something's wrong here. Either drop the "is needed" or the "we need". > reused for this, but we co

`git help svn` missing description of `propset`

2016-06-06 Thread Joseph Pecoraro
`git help svn` does not mention `propset` but it does mention `proplist` and `propget`. This seems like an oversight. $ git help svn ... proplist Lists the properties stored in the Subversion repository about a given file or directory. Use -r/--revision t

Re: [PATCH] cherry-pick: allow to pick to unborn branches

2016-06-06 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 06.06.2016 22:06: > Michael J Gruber writes: > >> Currently, cherry-pick allows tp pick single commits to an empty HEAD >> but not multiple commits. >> >> Allow the multiple commit case, too. >> >> Reported-by: Fabrizio Cucci >> Signed-off-by: Michael J Gruber

Re: [PATCH 4/8] Rename struct diff_filespec's sha1_valid member.

2016-06-06 Thread Jeff King
On Tue, Jun 07, 2016 at 08:21:26AM +0200, Johannes Sixt wrote: > > diff --git a/combine-diff.c b/combine-diff.c > > index f39be434..a20caa80 100644 > > --- a/combine-diff.c > > +++ b/combine-diff.c > > @@ -1269,7 +1269,7 @@ static struct diff_filepair *combined_pair(struct > > combine_diff_path *

Re: [PATCH 4/8] Rename struct diff_filespec's sha1_valid member.

2016-06-06 Thread Johannes Sixt
Am 07.06.2016 um 02:57 schrieb brian m. carlson: Now that this struct's sha1 member is called "oid", update the comment and the sha1_valid member to be called "oid_valid" instead. The following Coccinelle semantic patch was used to implement this, followed by the transformations in standard.cocc

[ANNOUNCE] Git v2.8.4

2016-06-06 Thread Junio C Hamano
The latest maintenance release Git v2.8.4 is now available at the usual places. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following public repositories all have a copy of the 'v2.8.4' tag and the 'maint' branch that the tag points at: url = https://kernel

What's cooking in git.git (Jun 2016, #02; Mon, 6)

2016-06-06 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. The hopefully final release candid

[ANNOUNCE] Git v2.9.0-rc2

2016-06-06 Thread Junio C Hamano
A release candidate Git v2.9.0-rc2 is now available for testing at the usual places. It is comprised of 477 non-merge commits since v2.8.0, contributed by 67 people, 27 of which are new faces. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/testing/ The following publ

Re: feature request: git svn dommit --preserve-timestamps

2016-06-06 Thread Peter Münster
On Tue, Jun 07 2016, Eric Wong wrote: > Peter Münster wrote: >> It would be nice, if timestamps could be preserved when rewriting the >> git-log. > > Unfortunately, last I checked (a long time ago!), explicitly > setting revprops might require SVN administrators to enable the > feature for the re

Re: [PATCH 1/2] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha

2016-06-06 Thread Ville Skyttä
On Mon, Jun 6, 2016 at 11:08 PM, Junio C Hamano wrote: > Ville Skyttä writes: > >> When the shell is in "nounset" or "set -u" mode, referencing unset or >> null variables results in an error. Protect $ZSH_VERSION and >> $BASH_VERSION against that, and initialize $short_sha before use. >> >> Signe

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

2016-06-06 Thread Eric Sunshine
On Fri, Jun 3, 2016 at 8:33 AM, Michael Haggerty wrote: > The iterator interface is modeled on that for references, though no > vtable is necessary because there is (so far?) only one type of > dir_iterator. > [...] Some minor comments below, though probably nothing demanding a re-roll... > Sign

Re: Minor Bug in Renaming Branches

2016-06-06 Thread Torsten Bögershausen
On 06/06/2016 09:35 PM, Stefan Beller wrote: On Mon, Jun 6, 2016 at 12:17 PM, Torsten Bögershausen wrote: A limitation is introduced by Mac OS and Windows: BRANCH/NAME and branch/name refer to the same object in the file system. As a workaround, you can pack the branch names: git pack-refs --a

Re: [PATCH 1/8] Add basic Coccinelle transforms.

2016-06-06 Thread Junio C Hamano
"brian m. carlson" writes: > My goal here is simply to avoid needing to include this set of > transformations in each commit message, which would tend to bloat it > considerably. Yeah, I understand that. Philosophically this is similar to what we traditionally keep in contrib/examples/, where i

Re: [PATCH 1/8] Add basic Coccinelle transforms.

2016-06-06 Thread brian m. carlson
On Mon, Jun 06, 2016 at 07:28:28PM -0700, Junio C Hamano wrote: > "brian m. carlson" writes: > > > Coccinelle (http://coccinelle.lip6.fr/) is a program which performs > > mechanical transformations on C programs using semantic patches. These > > semantic patches can be used to implement automati

Re: [PATCH 1/8] Add basic Coccinelle transforms.

2016-06-06 Thread Junio C Hamano
"brian m. carlson" writes: > Coccinelle (http://coccinelle.lip6.fr/) is a program which performs > mechanical transformations on C programs using semantic patches. These > semantic patches can be used to implement automatic refactoring and > maintenance tasks. > > Add a set of basic semantic pat

[PATCH 6/8] merge-recursive: convert struct merge_file_info to object_id

2016-06-06 Thread brian m. carlson
Convert struct merge_file_info to use struct object_id. The following Coccinelle semantic patch was used to implement this, followed by the transformations in standard.cocci: @@ struct merge_file_info *p; @@ - p->sha + p->oid.hash @@ struct merge_file_info o; @@ - o.sha + o.oid.hash Signed-off-

[PATCH 5/8] merge-recursive: convert struct stage_data to use object_id

2016-06-06 Thread brian m. carlson
Convert the anonymous struct within struct stage_data to use struct object_id. The following Coccinelle semantic patch was used to implement this, followed by the transformations in standard.cocci: @@ struct stage_data *p; expression E1; @@ - p->stages[E1].sha + p->stages[E1].oid.hash @@ struct

[PATCH 7/8] merge-recursive: convert leaf functions to use struct object_id

2016-06-06 Thread brian m. carlson
Convert all but two of the static functions in this file to use struct object_id. Signed-off-by: brian m. carlson --- merge-recursive.c | 236 +++--- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/merge-recursive.c b/merge-recurs

[PATCH 3/8] Convert struct diff_filespec to struct object_id

2016-06-06 Thread brian m. carlson
Convert struct diff_filespec's sha1 member to use a struct object_id called "oid" instead. The following Coccinelle semantic patch was used to implement this, followed by the transformations in standard.cocci: @@ struct diff_filespec *p; @@ - p->sha1 + p->oid.hash @@ struct diff_filespec o; @@ -

[PATCH 8/8] merge-recursive: convert merge_recursive_generic to object_id

2016-06-06 Thread brian m. carlson
Convert this function and the git merge-recursive subcommand to use struct object_id. Signed-off-by: brian m. carlson --- builtin/merge-recursive.c | 20 ++-- merge-recursive.c | 14 +++--- merge-recursive.h | 6 +++--- 3 files changed, 20 insertions(+),

[PATCH 4/8] Rename struct diff_filespec's sha1_valid member.

2016-06-06 Thread brian m. carlson
Now that this struct's sha1 member is called "oid", update the comment and the sha1_valid member to be called "oid_valid" instead. The following Coccinelle semantic patch was used to implement this, followed by the transformations in standard.cocci: @@ struct diff_filespec *p; @@ - p->sha1_valid

[PATCH 1/8] Add basic Coccinelle transforms.

2016-06-06 Thread brian m. carlson
Coccinelle (http://coccinelle.lip6.fr/) is a program which performs mechanical transformations on C programs using semantic patches. These semantic patches can be used to implement automatic refactoring and maintenance tasks. Add a set of basic semantic patches to convert common patterns related

[PATCH 2/8] Apply standard object_id Coccinelle transformations.

2016-06-06 Thread brian m. carlson
Apply the standard set of semantic patches to convert some leftover places using struct object_id's hash member to instead use the wrapper functions that take struct object_id natively. Signed-off-by: brian m. carlson --- bisect.c | 2 +- builtin/merge.c | 13 ++--- ref

Re: [PATCH 1/4] diff.h: extend "flags" field to 64 bits because we're out of bits

2016-06-06 Thread Duy Nguyen
On Tue, Jun 7, 2016 at 2:45 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Current flags field is 32-bits, all used except one bit and we need one >> more bit is needed for to toggle i-t-a behavior. The 9th bit could be >> reused for this, but we could just extend it to 64 bits no

[PATCH v2] regex: fix a SIZE_MAX macro redefinition warning

2016-06-06 Thread Ramsay Jones
Since commit 56a1a3ab ("Silence GCC's \"cast of pointer to integer of a different size\" warning", 26-10-2015), sparse has been issuing a macro redefinition warning for the SIZE_MAX macro. However, gcc did not issue any such warning. After commit 56a1a3ab, in terms of the order of #includes and #

Re: feature request: git svn dommit --preserve-timestamps

2016-06-06 Thread Eric Wong
Peter Münster wrote: > It would be nice, if timestamps could be preserved when rewriting the > git-log. Unfortunately, last I checked (a long time ago!), explicitly setting revprops might require SVN administrators to enable the feature for the repo. It's been a while and I'm not up-to-date with

[RFC][PATCH 0/8] struct object_id, Part 4

2016-06-06 Thread brian m. carlson
This series is part 4 in a series of conversions to replace instances of unsigned char [20] with struct object_id. Most of this series touches the merge-recursive code. New in this series is the use of Coccinelle (http://coccinelle.lip6.fr/) semantic patches. These semantic patches can make auto

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

2016-06-06 Thread Jeff King
On Mon, Jun 06, 2016 at 04:24:53PM -0700, Junio C Hamano wrote: > This is not about stack vs heap or even "cheaper" (whatever your > definition of cheap is). The principle applies equally if the > original buffer came from BSS. > > Perhaps I made it clearer by using a more exaggerated example e.

Re: `man 1 git`: Invalid link to online documentation

2016-06-06 Thread Jeff King
On Mon, Jun 06, 2016 at 07:19:36PM -0400, Jeff King wrote: > 2. Make git-htmldocs a real site on GitHub. I think this should be as > simple as pushing to the `gh-pages` branch of the repository, which > would make it available as https://gitster.github.io/git-htmldocs. > You can d

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

2016-06-06 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >>> I think that call should reset line.buf to the original buffer on >>> the stack, instead of saying "Ok, I'll ignore the original memory >>> not owned by us and instead keep pointing at the allocated memory", >>> as the allocation was done as a fal

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

2016-06-06 Thread Junio C Hamano
Jeff King writes: >> I think that call should reset line.buf to the original buffer on >> the stack, instead of saying "Ok, I'll ignore the original memory >> not owned by us and instead keep pointing at the allocated memory", >> as the allocation was done as a fallback measure. > > I am not sure

Re: `man 1 git`: Invalid link to online documentation

2016-06-06 Thread Jeff King
On Sun, Jun 05, 2016 at 08:59:00PM -0700, Daniel Campbell wrote: > In `man 1 git`, the Description section outlines an address to > pre-generated documentation [0]. That link returns a 404 error. Playing > around, I found the repository at [1] and found that it hasn't been > updated since August 2

Re: Coccinelle for automated refactors

2016-06-06 Thread brian m. carlson
On Mon, Jun 06, 2016 at 11:55:50AM -0700, Junio C Hamano wrote: > Is the plan for such a "refactor" patch to compose such a series as > two patch series: > > [1/2] automatic refactor > > which gives the "semantic patch" in the proposed log message as part > of its description, and the automated

Re: [PATCH v2 2/3] mailsplit: support unescaping mboxrd messages

2016-06-06 Thread Eric Wong
Junio C Hamano wrote: > This just makes me wonder if there is a practical reason why people > would not want this always enabled. I just looked at output from > > $ git log --grep='>>*From ' Missing '^' ? Auto-unescaping in mailsplit might throw off people on older versions of git if reser

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

2016-06-06 Thread Jeff King
On Mon, Jun 06, 2016 at 03:44:07PM -0700, Junio C Hamano wrote: > William Duclot writes: > > > I'm not sure to follow you. I agree that the "fixed strbuf" feature is > > flawed by the presence of this `die()`. But (unless misunderstanding) > > the "owns_memory" bit you talk about does exist in t

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

2016-06-06 Thread Junio C Hamano
William Duclot writes: > I'm not sure to follow you. I agree that the "fixed strbuf" feature is > flawed by the presence of this `die()`. But (unless misunderstanding) > the "owns_memory" bit you talk about does exist in this patch, and allow > the exact behavior you describe. Imagine that I kno

Re: [RFC/PATCHv2] Documentation: triangular workflow

2016-06-06 Thread Philip Oakley
From: "Junio C Hamano" Jordan DE GEA writes: +TRIANGULAR WORKFLOW +--- + +In some projects, you cannot push directly to the project but have to +suggest your commits to the maintainer (e.g. pull requests). +For these projects, it's common to use what's called a *triangular +wo

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-06-06 Thread Junio C Hamano
William Duclot writes: >> Yup, thanks. Isn't that what I queued as 0719f3ee (userdiff: add >> built-in pattern for CSS, 2016-06-03)? > > It is, my bad Not your bad at all. I am leaky and was asking you to double check; it was entirely possible that I missed your even newer patch and what was q

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-06-06 Thread William Duclot
On Mon, Jun 06, 2016 at 11:00:38AM -0700, Junio C Hamano wrote: > William Duclot writes: > > > On Fri, Jun 03, 2016 at 08:50:50AM -0700, Junio C Hamano wrote: > >> William Duclot writes: > >> > >> > Here I have to disagree (with you and Junio): the IPATTERN is > >> > case-insensitive only on th

Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-06-06 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +--shift-ita:: > + By default entries added by "git add -N" appear as an existing > + empty file in "git diff" and a new file in "git diff --cached". > + This option makes the entry appear as a new file in "git diff" > + and non-existent in "git dif

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

2016-06-06 Thread William Duclot
On Mon, Jun 06, 2016 at 10:19:07AM -0700, Junio C Hamano wrote: > William Duclot writes: > >> +#define MAX_ALLOC(a, b) (((a)>(b))?(a):(b)) > > I do not see why this macro is called MAX_ALLOC(); is there anything > "alloc" specific to what this does? You may happen to use it only > for "alloc" r

Re: Coccinelle for automated refactors

2016-06-06 Thread Jacob Keller
On Mon, Jun 6, 2016 at 11:55 AM, Junio C Hamano wrote: > "brian m. carlson" writes: > >> An example semantic patch looks like this: >> >> @@ >> expression E1; >> @@ >> - is_null_sha1(E1.hash) >> + is_null_oid(&E1) >> >> @@ >> expression E1; >> @@ >> - is_null_sha1(E1->hash) >> + is_null_oid(E1) >

Re: [PATCH 3/4] commit: don't count i-t-a entries when checking if the new commit is empty

2016-06-06 Thread Junio C Hamano
Junio C Hamano writes: > I am wondering if this "we do not include status and do not ask > run_status() about commitable bit" codepath should share more with > the other side, which you do not touch at all with this series, > which in turn must be doing the right thing already, apparently > witho

Re: [PATCH 1/2] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha

2016-06-06 Thread Junio C Hamano
Ville Skyttä writes: > When the shell is in "nounset" or "set -u" mode, referencing unset or > null variables results in an error. Protect $ZSH_VERSION and > $BASH_VERSION against that, and initialize $short_sha before use. > > Signed-off-by: Ville Skyttä > --- Thanks for following up. I do no

Re: [PATCH] cherry-pick: allow to pick to unborn branches

2016-06-06 Thread Junio C Hamano
Michael J Gruber writes: > Currently, cherry-pick allows tp pick single commits to an empty HEAD > but not multiple commits. > > Allow the multiple commit case, too. > > Reported-by: Fabrizio Cucci > Signed-off-by: Michael J Gruber > --- > sequencer.c | 11 ++- > 1 file changed, 6 inse

Re: [PATCH 3/4] commit: don't count i-t-a entries when checking if the new commit is empty

2016-06-06 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > i-t-a entries are excluded from tree building. Relying solely on active_nr > (or diff without --shift-ita) may lead to empty commits sometimes, when > i-t-a entries are the only ones "changed" in the index. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > builtin/

Re: [PATCH 1/4] diff.h: extend "flags" field to 64 bits because we're out of bits

2016-06-06 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Current flags field is 32-bits, all used except one bit and we need one > more bit is needed for to toggle i-t-a behavior. The 9th bit could be > reused for this, but we could just extend it to 64 bits now to give room > for more future flags. Isn't it a better op

feature request: git svn dommit --preserve-timestamps

2016-06-06 Thread Peter Münster
Hi, It would be nice, if timestamps could be preserved when rewriting the git-log. Use case: I often make a dcommit after several days of development (20 or 30 commits), because - the users of the svn-server don't need it more often; - and for the dcommit I need a VPN-connection to a server, that

Re: Minor Bug in Renaming Branches

2016-06-06 Thread Stefan Beller
On Mon, Jun 6, 2016 at 12:17 PM, Torsten Bögershausen wrote: > A limitation is introduced by Mac OS and Windows: > BRANCH/NAME and branch/name refer to the same object in the file > system. > As a workaround, you can pack the branch names: > git pack-refs --all Once you packed a branch into the

Re: [PATCH] submodule operations: tighten pathspec errors

2016-06-06 Thread Stefan Beller
On Wed, Jun 1, 2016 at 2:14 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Thu, May 26, 2016 at 1:00 PM, Junio C Hamano wrote: >> @@ -36,10 +37,9 @@ static int module_list_compute(int argc, const char **argv, for (i = 0; i < active_nr; i++) {

Re: [RFC/PATCHv2] Documentation: triangular workflow

2016-06-06 Thread Junio C Hamano
Jordan DE GEA writes: > +TRIANGULAR WORKFLOW > +--- > + > +In some projects, you cannot push directly to the project but have to > +suggest your commits to the maintainer (e.g. pull requests). > +For these projects, it's common to use what's called a *triangular > +workflow*: > +

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

2016-06-06 Thread Philip Oakley
From: "Matthieu Moy" "Philip Oakley" writes: From: "Matthieu Moy" I don't think you will find a name that fits all use-cases. IHMO, best is to pick one rather general use-case, make the explanations for it, and maybe explain somewhere that there are variants. If the fork is completely pri

Re: Minor Bug in Renaming Branches

2016-06-06 Thread Torsten Bögershausen
On 06.06.16 19:52, Samuel Lijin wrote: > Hi, > > Not quite sure where to submit bug reports about Git, this was the > best I could find, so if there's a better place to do this, please let > me know and I will. > > The short of this issue is that on Mac and Windows, if a branch has a > slash in i

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-06 Thread Junio C Hamano
Matthieu Moy writes: >> +test_config_unchanged () { >> +git config --list --local >original >> +"$@" >> +git config --list --local >modified >> +test_cmp original modified >> +} > > The test passes if "$@" fails. You should &&-chain the lines here to > catch things like crashes or

Re: Coccinelle for automated refactors

2016-06-06 Thread Junio C Hamano
"brian m. carlson" writes: > An example semantic patch looks like this: > > @@ > expression E1; > @@ > - is_null_sha1(E1.hash) > + is_null_oid(&E1) > > @@ > expression E1; > @@ > - is_null_sha1(E1->hash) > + is_null_oid(E1) > > This does what you think it does: transforms calls to is_null_sha1 th

Re: [PATCH 2/2] log: "--no-show-signature" commmand-line option

2016-06-06 Thread Junio C Hamano
Mehul Jain writes: > If "log.showSignature=true", then there is no way to override it using > command line switch. > > Teach git-log and related commands about "--no-showSignature" command > line option. Doesn't that suggest that 1/2 alone will cause users problems? The users can by mistake set

Re: [PATCH v2 2/3] mailsplit: support unescaping mboxrd messages

2016-06-06 Thread Junio C Hamano
Eric Wong writes: > This will allow us to parse the output of --pretty=mboxrd > and the output of other mboxrd generators. > > Signed-off-by: Eric Wong > --- > Documentation/git-mailsplit.txt | 7 ++- > builtin/mailsplit.c | 18 ++ > t/t5100-mailinfo.sh

Re: [PATCH] regex: fix a SIZE_MAX macro redefinition warning

2016-06-06 Thread Junio C Hamano
Ramsay Jones writes: > The original version of this patch looked like this: > ... > So, just move the unconditional inclusion to the start of the compilation > unit root file, before the #include of the regex_internal.h header. > > In some ways this is a better fix, because it makes it clear that

Re: Minor Bug in Renaming Branches

2016-06-06 Thread Stefan Beller
On Mon, Jun 6, 2016 at 10:52 AM, Samuel Lijin wrote: > user@windows-box MINGW64 ~/sandbox (branch/name) > $ git branch -m BRANCH/NAME > fatal: A branch named 'BRANCH/NAME' already exists. Yeah, branches/refs are treated as if they are files on a file system (which they are currently). So dependin

Re: [PATCH v4 0/3] support completion for git status

2016-06-06 Thread Junio C Hamano
Thomas Braun writes: > changes since v3: > * support short version -u of --untracked-files option > * introduce __git_get_option_value for general usage > * fix style issues > * support order dependent statements like > git status -uno --untracked-files=all > properly > > Thomas Braun (3): >

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-06-06 Thread Junio C Hamano
William Duclot writes: > On Fri, Jun 03, 2016 at 08:50:50AM -0700, Junio C Hamano wrote: >> William Duclot writes: >> >> > Here I have to disagree (with you and Junio): the IPATTERN is >> > case-insensitive only on the "pattern" regex, not the "word_regex" >> > regex. >> >> Ahh, OK. Obviously

Re: [PATCH v4 3/3] completion: add git status

2016-06-06 Thread Junio C Hamano
Thomas Braun writes: > + case "$cur" in > + --ignore-submodules=*) > + __gitcomp "none untracked dirty all" "" > "${cur##--ignore-submodules=}" > + return > + ;; > + --untracked-files=*) > + __gitcomp "$__git_untracked_file_modes" "" >

Minor Bug in Renaming Branches

2016-06-06 Thread Samuel Lijin
Hi, Not quite sure where to submit bug reports about Git, this was the best I could find, so if there's a better place to do this, please let me know and I will. The short of this issue is that on Mac and Windows, if a branch has a slash in its name, changing it from lowercase to uppercase requir

Re: Coccinelle for automated refactors

2016-06-06 Thread Stefan Beller
On Sun, Jun 5, 2016 at 1:55 PM, brian m. carlson wrote: > One thing that I've noticed with the struct object_id conversion is that > most of the work is mechanical transformations of a data member from one > type into another. Doing this by hand is both boring and error-prone, > and it requires a

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

2016-06-06 Thread Junio C Hamano
William Duclot writes: > +#define MAX_ALLOC(a, b) (((a)>(b))?(a):(b)) I do not see why this macro is called MAX_ALLOC(); is there anything "alloc" specific to what this does? You may happen to use it only for "alloc" related things, but that is not a good reason for such a name (if the implemen

Re: [BUG?] trailer command with multiple keys

2016-06-06 Thread Christian Couder
On Mon, Jun 6, 2016 at 2:27 PM, Michael J Gruber wrote: > The command > > printf "body\n\ntest: foo\ntest: froz\n" | git -c > trailer.test.key=tested -c trailer.test.command="echo by \$ARG" > interpret-trailers > > gives: > > body > > tested: foo > tested: froz > tested: by froz > > I expected the

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

2016-06-06 Thread Matthieu Moy
"Philip Oakley" writes: > From: "Matthieu Moy" >> >> I don't think you will find a name that fits all use-cases. IHMO, best >> is to pick one rather general use-case, make the explanations for it, >> and maybe explain somewhere that there are variants. >> >> If the fork is completely private, th

Re: licensing question

2016-06-06 Thread Stefan Beller
On Mon, Jun 6, 2016 at 9:40 AM, Matthieu Moy wrote: > "Annie Wojcik" writes: > >> Hello, >> Can you tell me if this product is free for educational use? > > Git is free, period ;-). Both free of charge, and "free as in free > speach" (http://www.gnu.org/philosophy/free-sw.en.html). A quick overv

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

2016-06-06 Thread Philip Oakley
From: "Matthieu Moy" Jordan DE GEA writes: Matthieu Moy a écrit : That is technically correct, but to illustrate the overall flow, I'd rather avoid naming the repositories in terms of git commands. If you do so, you will probably end up with tautological explanations like this later in the

Re: licensing question

2016-06-06 Thread Matthieu Moy
"Annie Wojcik" writes: > Hello, > Can you tell me if this product is free for educational use? Git is free, period ;-). Both free of charge, and "free as in free speach" (http://www.gnu.org/philosophy/free-sw.en.html). -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from thi

licensing question

2016-06-06 Thread Annie Wojcik
Hello, Can you tell me if this product is free for educational use? We would like to include it in our software master and have it installed on all computers. We are just double checking as some license agreements can be confusing. Thanks Annie Annie Wojcik Technical Support Specialist Techni

Re: [RFC/PATCH] push: deny policy to prevent pushes to unwanted remotes.

2016-06-06 Thread Matthieu Moy
Matthieu Moy writes: >> + *easier and avoid confusion with a distant repo like 'github.com' Forgotten nit in previous message: s/distant/remote/. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to major

Re: [PATCH v3 2/3] doc: change environment variables format

2016-06-06 Thread Tom Russello
On 06/06/16 16:08, Matthieu Moy wrote: > I'd add to the commit message that one of the goals of this patch is to > make the use "mostly consistent" with CodingGuidelines, so that people > writting new doc by mimicking the existing one later get a good > probability of getting it right even if they

Re: [PATCH 1/2] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha

2016-06-06 Thread Ville Skyttä
On Mon, Jun 6, 2016 at 7:29 PM, Ville Skyttä wrote: > When the shell is in "nounset" or "set -u" mode, referencing unset or > null variables results in an error. Protect $ZSH_VERSION and > $BASH_VERSION against that, and initialize $short_sha before use. No part 2/2 will be coming, 1/2 is all the

Re: [PATCH] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION

2016-06-06 Thread Ville Skyttä
On Tue, May 24, 2016 at 8:27 PM, Junio C Hamano wrote: > Ville Skyttä writes: > >> When the shell is in "nounset" or "set -u" mode, referencing unset or >> null variables results in an error. Protect $ZSH_VERSION and >> $BASH_VERSION against that. >> local ps1_expanded=yes >> - [ -z "$Z

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-06 Thread Philip Oakley
From: "Erwan Mathoniere" Implement `git pull [--set-upstream | -u] ` that set tracking to the remote branch the user just pulled from. After successfully pulling from ``, for each `` described in format `:`, set `branch..remote` to `` and `branch..merge` to `refs/heads/`. If `` lacks `` in the

[PATCH 1/2] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha

2016-06-06 Thread Ville Skyttä
When the shell is in "nounset" or "set -u" mode, referencing unset or null variables results in an error. Protect $ZSH_VERSION and $BASH_VERSION against that, and initialize $short_sha before use. Signed-off-by: Ville Skyttä --- contrib/completion/git-prompt.sh | 6 +++--- 1 file changed, 3 inse

Re: [PATCH] completion: complete --move for git branch

2016-06-06 Thread Ville Skyttä
On Mon, Jun 6, 2016 at 5:16 PM, Remi Galan Alfonso wrote: > > Hi, > > Ville Skyttä writes: > > while [ $c -lt $cword ]; do > > i="${words[c]}" > > case "$i" in > > --d|-m)only_local_ref="y" ;; > > --r)has_r

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

2016-06-06 Thread Matthieu Moy
I'm waiting for the discussion "is this useful" to settle before I do a final review, but I went quickly through the code and it seems OK. Just to show I read till the end: William Duclot writes: > +test_expect_success 'check preallocated strbuf behavior in usual use cases' ' > + > + test-s

Re: [RFC/PATCH] push: deny policy to prevent pushes to unwanted remotes.

2016-06-06 Thread Junio C Hamano
Matthieu Moy writes: > Antoine Queru writes: > >> Currently, a user wanting to prevent accidental pushes to the wrong >> remote has to create a pre-push hook. The feature > > It's not clear what "The feature" refers to. Given the context, I read > it as "pre-push hook", but I think this is not

Re: [PATCH V2 2/3] pretty.c: rename strbuf_wrap() function

2016-06-06 Thread Matthieu Moy
William Duclot writes: > The function strbuf_wrap() is not part of the strbuf API, yet prevent to > extend the API to include wrapping functions. Renaming it to something > more specific allow to use "strbuf_wrap" for the strbut API. s/strbut/strbuf/ -- Matthieu Moy http://www-verimag.imag.fr/

Re: [PATCH V2 1/3] strbuf: add tests

2016-06-06 Thread Matthieu Moy
William Duclot writes: > --- a/Makefile > +++ b/Makefile > @@ -613,6 +613,7 @@ TEST_PROGRAMS_NEED_X += test-scrap-cache-tree > TEST_PROGRAMS_NEED_X += test-sha1 > TEST_PROGRAMS_NEED_X += test-sha1-array > TEST_PROGRAMS_NEED_X += test-sigchain > +TEST_PROGRAMS_NEED_X += test-strbuf > TEST_PROG

Re: [RFC/PATCH v2] pull: add --set-upstream

2016-06-06 Thread Matthieu Moy
Erwan Mathoniere writes: > @@ -497,6 +504,10 @@ static void NORETURN die_no_merge_candidates(const char > *repo, const char **refs > fprintf(stderr, "\n"); > fprintf_ln(stderr, _("If you wish to set tracking information > for this branch you can do so with:")); >

Re: [PATCH v3 1/3] doc: clearer rule about formatting literals

2016-06-06 Thread Tom Russello
On 06/06/16 15:42, Matthieu Moy wrote: > Matthieu Moy writes: > >> Tom Russello writes: >>> + Literal examples (e.g. use of command-line options, command names, >>> + configuration and environment variables) must be typeset in monospace >>> (i.e. >>> + wrapped with backticks): >>> `--pretty

Re: [RFC/PATCH] push: deny policy to prevent pushes to unwanted remotes.

2016-06-06 Thread Matthieu Moy
Antoine Queru writes: > Currently, a user wanting to prevent accidental pushes to the wrong > remote has to create a pre-push hook. The feature It's not clear what "The feature" refers to. Given the context, I read it as "pre-push hook", but I think this is not what you meant. > User, password

Re: [PATCH] cherry-pick: allow to pick to unborn branches

2016-06-06 Thread Torsten Bögershausen
On 06.06.16 15:23, Michael J Gruber wrote: > Currently, cherry-pick allows tp pick single commits to an empty HEAD Typo: ^^ -- 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

[PATCH V2 0/3] strbuf: improve API

2016-06-06 Thread William Duclot
This patch series implements an improvment of the strbuf API, allowing strbuf to use preallocated memory. This makes strbuf fit to be used in performance-critical operations. * The first patch is simply a preparatory work, adding tests for existing strbuf implementation. * The second patch is also

[PATCH V2 1/3] strbuf: add tests

2016-06-06 Thread William Duclot
Test the strbuf API. Being used throughout all Git the API could be considered tested, but adding specific tests makes it easier to improve and extend the API. Signed-off-by: William Duclot Signed-off-by: Simon Rabourg Signed-off-by: Matthieu Moy --- Changes since V1: * Use the parser API

[PATCH V2 2/3] pretty.c: rename strbuf_wrap() function

2016-06-06 Thread William Duclot
The function strbuf_wrap() is not part of the strbuf API, yet prevent to extend the API to include wrapping functions. Renaming it to something more specific allow to use "strbuf_wrap" for the strbut API. Signed-off-by: William Duclot Signed-off-by: Simon Rabourg Signed-off-by: Matthieu Moy ---

[PATCH V2 3/3] strbuf: allow to use preallocated memory

2016-06-06 Thread William Duclot
When working with strbufs (usually for dates or paths), the malloc()/free() overhead could be easily avoided: as a sensible initial buffer size is already known, it could be allocated on the stack. This could avoid workarounds such as void f() { static struct strbuf path; s

Re: [PATCH v3 1/6] git-fetch.txt: document fetch output

2016-06-06 Thread Marc Branchaud
On 2016-06-04 11:11 PM, Nguyễn Thái Ngọc Duy wrote: This documents the ref update status of fetch. The structure of this output is defined in [1]. The ouput content is refined a bit in [2] [3] [4]. This patch is a copy from git-push.txt, modified a bit because the flag '-' means different things

Re: [PATCH v3 3/3] doc: change configuration variables format

2016-06-06 Thread Matthieu Moy
Tom Russello writes: > As a first step, Is this your second first step? ;-) As 3rd and 4th first steps, I'd suggest: Format short options properly: perl -pi -e "s/'(-[a-z])'/\`\$1\`/g" *.txt Format long options properly: perl -pi -e "s/'(--[a-z][a-z=<>-]*)'/\`\$1\`/g" *.txt This does not hav

Re: [PATCH v3 2/3] doc: change environment variables format

2016-06-06 Thread Matthieu Moy
Tom Russello writes: > As a first step, this change GIT_* variables that where in > italic style to monospace font according to the guideline. It was obtained > with > > perl -pi -e "s/\'(GIT_.*?)\'/\`\1\`/g" *.txt Good. I'd add to the commit message that one of the goals of this patch is

Re: [PATCH] completion: complete --move for git branch

2016-06-06 Thread Remi Galan Alfonso
Hi, Ville Skyttä writes: > while [ $c -lt $cword ]; do > i="${words[c]}" > case "$i" in > --d|-m)only_local_ref="y" ;; > --r)has_r="y" ;; > +-d|-m|--move)only_local_ref="y" ;; "Whil

Re: [PATCH] push: deny policy to prevent pushes to unwanted remotes.

2016-06-06 Thread Antoine Queru
Hello Lars, thanks for your reply. > > > > On 30 May 2016, at 06:45, Antoine Queru > > wrote: > > > > Currently, a user wanting to prevent accidental pushes to the wrong remote > > has to create a pre-push hook. > > The feature offers a configuration to allow users to prevent accidental > > pu

Re: [PATCH v3 1/3] doc: clearer rule about formatting literals

2016-06-06 Thread Matthieu Moy
Matthieu Moy writes: > Tom Russello writes: > >> --- a/Documentation/CodingGuidelines >> +++ b/Documentation/CodingGuidelines >> @@ -526,12 +526,13 @@ Writing Documentation: >> modifying paragraphs or option/command explanations that contain options >> or commands: >> >> - Literal examples

Re: [RFC/PATCH] push: deny policy to prevent pushes to unwanted remotes.

2016-06-06 Thread Antoine Queru
- Mail original - > Hi Antoine, > > Antoine Queru writes: > > [...] > > +For example, if we set up the configuration variables like this: > > + > > +--- > > +git config --add remote.pushBlacklist repository.com > > +git config --add remote.pushWhitelist repos

Re: [PATCH v3 1/3] doc: clearer rule about formatting literals

2016-06-06 Thread Matthieu Moy
Tom Russello writes: > --- a/Documentation/CodingGuidelines > +++ b/Documentation/CodingGuidelines > @@ -526,12 +526,13 @@ Writing Documentation: > modifying paragraphs or option/command explanations that contain options > or commands: > > - Literal examples (e.g. use of command-line option

[PATCH] cherry-pick: allow to pick to unborn branches

2016-06-06 Thread Michael J Gruber
Currently, cherry-pick allows tp pick single commits to an empty HEAD but not multiple commits. Allow the multiple commit case, too. Reported-by: Fabrizio Cucci Signed-off-by: Michael J Gruber --- sequencer.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/seque

  1   2   >