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

[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

[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 =

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. > >

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 >

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

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

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:

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

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

Re: [PATCH v4 1/2] builtin/apply: add 'lock_file' pointer into 'struct apply_state'

2016-06-06 Thread Christian Couder
On Fri, Jun 3, 2016 at 8:03 PM, Junio C Hamano wrote: > Christian Couder writes: > >> This is to replace: >> >> "[PATCH v3 48/49] builtin/apply: move 'lock_file' global into 'struct >> apply_state'" >> >> from the "libify apply and use lib in am,

[PATCH/RFC 0/4] i-t-a entries again...

2016-06-06 Thread Nguyễn Thái Ngọc Duy
The first two patches bring back a patch does fixes "git status" when i-t-a entries are present (i.e. "git diff" should show new files while "git diff --cached" should show no changes). The third commit fixes "git commit" creating empty commits when i-t-a entries are the only changes compared to

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

2016-06-06 Thread William Duclot
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.

[PATCH v5 1/2] builtin/apply: add 'lock_file' pointer into 'struct apply_state'

2016-06-06 Thread Christian Couder
From: Christian Couder We cannot have a 'struct lock_file' allocated on the stack, as lockfile.c keeps a linked list of all created lock_file structures. Also 'struct apply_state' users might later want the same 'struct lock_file' instance to be reused by different

[PATCH v5 2/2] builtin/apply: move 'newfd' global into 'struct apply_state'

2016-06-06 Thread Christian Couder
From: Christian Couder To libify the apply functionality the 'newfd' variable should not be static and global to the file. Let's move it into 'struct apply_state'. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano

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

2016-06-06 Thread Tom Russello
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 Signed-off-by: Tom Russello Signed-off-by: Erwan Mathoniere

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

2016-06-06 Thread Tom Russello
As a first step, this change configuration variables that where in italic style to monospace font according to the guideline. It was obtained with grep '[[:alpha:]]*\.[[:alpha:]]*::$' config.txt | \ sed -e 's/::$//' -e 's/\././' | \ xargs -iP perl -pi -e

[PATCH v3] Documentation more consistent

2016-06-06 Thread Tom Russello
Hello, as `MAN_BOLD_LITERAL` knob is just now turned on by default with 5945717 (Documentation: bold literals in man, 2016-05-31), it is the right time to make our documentation more consistent. Changes since v2: prefix the email subject lines with "doc:" -- To unsubscribe from this list: send

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

2016-06-06 Thread Tom Russello
Make the guideline text that we want for our documentation clearer. Signed-off-by: Tom Russello Signed-off-by: Erwan Mathoniere Signed-off-by: Samuel Groot Signed-off-by: Matthieu Moy

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

2016-06-06 Thread 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

[RFC/PATCHv2] Documentation: triangular workflow

2016-06-06 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. A new subsection is created in gitworkflow. Signed-off-by: Michael Haggerty Signed-off-by: Matthieu Moy

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

2016-06-06 Thread Nguyễn Thái Ngọc Duy
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/commit.c | 12

[PATCH/RFC 4/4] commit: reinstate commit behavior before 3f6d56d via a config option

2016-06-06 Thread Nguyễn Thái Ngọc Duy
There are two groups of users with regards to "git add -N". One uses i-t-a as a reminder that certain untracked files must be added before the next commit. Erroring when i-t-a entries are still present (i.e. real content not added) out gives the user a chance to add real content. The other group

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

2016-06-06 Thread 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 reused for this, but we could just extend it to 64 bits now to give room for more future flags. gcc -Wconversion is used to catch assignments that truncate

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

2016-06-06 Thread Nguyễn Thái Ngọc Duy
The original commit d95d728aba06a34394d15466045cbdabdada58a2 was reverted in commit 78cc1a540ba127b13f2f3fd531777b57f3a9cd46 because we were (and still are) not ready for a new world order. A lot more investigation must be done to see what is impacted. See the 78cc1a5 for details. This patch

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

2016-06-06 Thread Remi Galan Alfonso
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

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

2016-06-06 Thread Ville Skyttä
Signed-off-by: Ville Skyttä --- contrib/completion/git-completion.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 3402475..6918cc8 100644 ---

Re: error: Can't cherry-pick into empty head

2016-06-06 Thread Michael J Gruber
Fabrizio Cucci venit, vidit, dixit 28.05.2016 19:54: > Hello everyone, > > I'm trying to understand why I'm getting the error as per subject. > > The scenario is the following: I'm on the master branch (which > contains several commits) and I would like to create a new empty > branch (let's call

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)

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

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

[BUG?] trailer command with multiple keys

2016-06-06 Thread Michael J Gruber
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 command to be run on each "test" key, resulting in the output: body: tested:

[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

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

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

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

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

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

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

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"

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

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)

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

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

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 >

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. >>

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

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

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: [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.

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 >

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

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

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/ --

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

[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 +++---

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

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

[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;

[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

[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

[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

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

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?

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() > > @@ > expression E1; > @@ > - is_null_sha1(E1->hash) > + is_null_oid(E1) > > This does what you think it does:

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

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

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,

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

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

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,

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

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.

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,

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

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ä

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

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

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 >

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

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

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,

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

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

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

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

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

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

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

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() >> >> @@ >> expression E1; >> @@ >>

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

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", >>>

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

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

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

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

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: `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

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. >

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

  1   2   >