[PATCH] branch.c: Allow "-" as a short-hand for "@{-1}" in "git branch -d @{-1}"

2016-03-04 Thread Dinesh Polathula
From: Dinesh The "-" shorthand can be used as a replacement for "@{-1}" to refer to the previous branch the user was on in the "git branch -d @{-1}" command. Replace "-" argument with "@{-1}" when the command line arguments are parsed. Signed-off-by: Dinesh

[PATCH] Allow "-" as a short-hand for "@{-1}" for branch deletion

2016-03-04 Thread Dinesh Polathula
From: Dinesh *** This patch allows the usage of "-" as a short-hand for "@{-1}" in "git branch -d @{-1}". Note : This is a microproject that is part of the Google Summer of Code application process. I am interested in working on the git Beginner mode implementation as

Re: [PATCH 1/3] git reset --hard gives clean working tree

2016-03-04 Thread Torsten Bögershausen
On 11.02.16 19:49, Junio C Hamano wrote: > tbo...@web.de writes: > >> From: Torsten Bögershausen >> >> We define the working tree file is clean if either: >> >> * the result of running convert_to_git() on the working tree >> contents matches what is in the index (because

Re: [PATCH 1/2] mergetool: honor tempfile configuration when resolving delete conflicts

2016-03-04 Thread Junio C Hamano
David Aguilar writes: > Teach resolve_deleted_merge() to honor the mergetool.keepBackup and > mergetool.keepTemporaries configuration knobs. > > This ensures that the worktree is kept pristine when resolving deletion > conflicts with the variables both set to false. > >

[PATCH 2/2] mergetool: support delete/delete conflicts

2016-03-04 Thread David Aguilar
If two branches each move a file into different directories then mergetool will fail because it assumes that the file being merged, and its parent directory, are present in the worktree. Create the merge file's parent directory to allow using the deleted base version of the file for merge

[PATCH 1/2] mergetool: honor tempfile configuration when resolving delete conflicts

2016-03-04 Thread David Aguilar
Teach resolve_deleted_merge() to honor the mergetool.keepBackup and mergetool.keepTemporaries configuration knobs. This ensures that the worktree is kept pristine when resolving deletion conflicts with the variables both set to false. Signed-off-by: David Aguilar ---

Re: Git clone sends first an empty authorization header

2016-03-04 Thread Guilherme
Hey Bryan, Yes that will happen he will get a prompet for username/password but he already provided them in the URL and it worked before. He could clone. I think this is a little bit confusing. My problem is that the tool I'm trying to build is trying to provide the username used to log in via

Re: Git clone sends first an empty authorization header

2016-03-04 Thread Bryan Turner
On Fri, Mar 4, 2016 at 9:51 PM, Guilherme wrote: > Hi, > > When doing basic authentication using git clone by passing the > username and password in the url git clone will first send a GET > request without the authorization header set. > > Am i seeing this right? I believe

Git clone sends first an empty authorization header

2016-03-04 Thread Guilherme
Hi, When doing basic authentication using git clone by passing the username and password in the url git clone will first send a GET request without the authorization header set. Am i seeing this right? This means that if the counterpart allows anonymous cloning but not pushing and the user

Re: [PATCH] l10n: TEAMS: update Ralf Thielow's email address

2016-03-04 Thread Jiang Xin
That's fine. Already pulled to git-po. 2016-03-04 4:48 GMT+08:00 Ralf Thielow : > Signed-off-by: Ralf Thielow > --- > po/TEAMS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/po/TEAMS b/po/TEAMS > index df12b58..56274ad

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Junio C Hamano
Charles Strahan writes: > ...as Duy suggests, I think the new behavior makes a bit > more sense. After re-reading your original example, I am inclined to agree with this. > Either way, of course, I'd like for it to not change back and > forth between releases :). > >

Re: [PATCH 2/2] xdiff/xprepare: fix a memory leak

2016-03-04 Thread Ramsay Jones
On 04/03/16 23:50, Junio C Hamano wrote: > Ramsay Jones writes: > >> The xdl_prepare_env() function may initialise an xdlclassifier_t >> data structure via xdl_init_classifier(), which allocates memory >> to several fields, for example 'rchash', 'rcrecs' and

[PATCH v4] fetch-pack: fix object_id of exact sha1

2016-03-04 Thread Gabriel Souza Franco
Commit 58f2ed0 (remote-curl: pass ref SHA-1 to fetch-pack as well, 2013-12-05) added support for specifying a SHA-1 as well as a ref name. Add support for specifying just a SHA-1 and set the ref name to the same value in this case. Signed-off-by: Gabriel Souza Franco

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Charles Strahan
The fix on my side was quite easy (and my .gitignore is probably a _lot_ hairier than most), and as Duy suggests, I think the new behavior makes a bit more sense. Personally, I would be pleased with keeping the new behavior, and chalking it up to an unintentional bug fix (the best kind). Either

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Duy Nguyen
typo fixes On Sat, Mar 5, 2016 at 7:43 AM, Duy Nguyen wrote: > On Sat, Mar 5, 2016 at 12:28 AM, Junio C Hamano wrote: >> Duy Nguyen writes: >> >>> On Fri, Mar 4, 2016 at 6:56 PM, Kevin Daudt wrote: Verified that

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Duy Nguyen
On Sat, Mar 5, 2016 at 12:28 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Fri, Mar 4, 2016 at 6:56 PM, Kevin Daudt wrote: >>> Verified that it's different in 2.7.0, but 2.7.2 gives expected output. >> >> Thanks. 2.7.1 reverts the

Re: Diff filename has trailing tab if filename contains space

2016-03-04 Thread Junio C Hamano
乙酸鋰 writes: > Hi, > > Using git 2.7.1 > > Diff filename has trailing tab if filename contains space Thanks; that is very much deliberate and has been with us forever. commit 1a9eb3b9d50367bee8fe85022684d812816fe531 Author: Junio C Hamano Date: Fri Sep 22

Re: [PATCH 2/2] xdiff/xprepare: fix a memory leak

2016-03-04 Thread Junio C Hamano
Ramsay Jones writes: > The xdl_prepare_env() function may initialise an xdlclassifier_t > data structure via xdl_init_classifier(), which allocates memory > to several fields, for example 'rchash', 'rcrecs' and 'ncha'. > If this function later exits due to the

Diff filename has trailing tab if filename contains space

2016-03-04 Thread 乙酸鋰
Hi, Using git 2.7.1 Diff filename has trailing tab if filename contains space Please run below shell script and look at the output diff file 1.diff There is trailing tab chars after these lines: --- a/8 1/8.txt +++ b/8 1/8.txt b/9 86 +++ b/9 86 #!/bin/sh set -e git init echo a >>

[PATCH 2/2] xdiff/xprepare: fix a memory leak

2016-03-04 Thread Ramsay Jones
The xdl_prepare_env() function may initialise an xdlclassifier_t data structure via xdl_init_classifier(), which allocates memory to several fields, for example 'rchash', 'rcrecs' and 'ncha'. If this function later exits due to the failure of xdl_optimize_ctxs(), then this xdlclassifier_t

[PATCH 1/2] xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits

2016-03-04 Thread Ramsay Jones
Commit 307ab20b3 ("xdiff: PATIENCE/HISTOGRAM are not independent option bits", 19-02-2012) introduced the XDF_DIFF_ALG() macro to access the flag bits used to represent the diff algorithm requested. In addition, code which had used explicit manipulation of the flag bits was changed to use the

[PATCH 0/2] diff: fix a memory leak

2016-03-04 Thread Ramsay Jones
A recent memory leak patch from Patrick, commit 4867f1184 ("xdiff/xmerge: fix memory leak in xdl_merge", 23-02-2016), reminded me that I had a similar patch lying around. After checking that it wasn't the same one, I dusted it off, and split it into these two patches. One of the reasons for not

[ANNOUNCE] Git v2.8.0-rc1

2016-03-04 Thread Junio C Hamano
A release candidate Git v2.8.0-rc1 is now available for testing at the usual places. It is comprised of 453 non-merge commits since v2.7.0, contributed by 59 people, 19 of which are new faces. There still is a known regression around "git status" (and "ls-files -o") relative to v2.7.2, which we

What's cooking in git.git (Mar 2016, #02; Fri, 4)

2016-03-04 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. v2.8-rc1 has been tagged. There

git-completion.bash emitting error messages

2016-03-04 Thread Дилян Палаузов
Hello, I use ./bash 4.3.42 with bundled libreadline and git/contrib/completion/git-completion.bash , as modified by commit 8716bdca268 from 22 Feb 2016. I cd to git.git (non-bare, with working tree) and type git b62c.. ori to force TAB-completion. And then on the shell comes the output

Re: [PATCH] t9700: fix test for perl older than 5.14

2016-03-04 Thread Christian Couder
On Fri, Mar 4, 2016 at 1:21 PM, Dennis Kaarsemaker wrote: > On vr, 2016-03-04 at 06:43 -0500, Jeff King wrote: >> On Fri, Mar 04, 2016 at 11:58:24AM +0100, Dennis Kaarsemaker wrote: >> >> > On vr, 2016-03-04 at 03:56 -0500, Jeff King wrote: >> > > ? Those are just guesses,

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Junio C Hamano
Junio C Hamano writes: > Duy Nguyen writes: > >> On Fri, Mar 4, 2016 at 6:56 PM, Kevin Daudt wrote: >>> Verified that it's different in 2.7.0, but 2.7.2 gives expected output. >> >> Thanks. 2.7.1 reverts the faulty commit from 2.7.0 that

Re: [PATCH] stripspace: add --line-count flag

2016-03-04 Thread Junio C Hamano
Junio C Hamano writes: > Sidhant Sharma writes: > >> This is my first attempt at the small project listed here: >> https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#implement_.27--count-lines.27_in_.27git_stripspace.27. > >> Comments? > > Isn't

Re: [PATCH] stripspace: add --line-count flag

2016-03-04 Thread Sidhant Sharma
On Saturday 05 March 2016 12:19 AM, Junio C Hamano wrote: > Sidhant Sharma writes: > >> This is my first attempt at the small project listed here: >> https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#implement_.27--count-lines.27_in_.27git_stripspace.27. >>

Re: git diff does not precompose unicode file paths (OS X)

2016-03-04 Thread Ramsay Jones
On 04/03/16 14:37, Alexander Rinass wrote: > >> On 04 Mar 2016, at 13:16, Torsten Bögershausen wrote: >> >> On 03/04/2016 10:07 AM, Alexander Rinass wrote: [snip] > > Sticking a precompose_argv(argc, argv) into diff.c’s cmd_diff function fixes > the issue. > > But I had to

Re: [PATCH] stripspace: add --line-count flag

2016-03-04 Thread Junio C Hamano
Sidhant Sharma writes: > This is my first attempt at the small project listed here: > https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#implement_.27--count-lines.27_in_.27git_stripspace.27. > Comments? Isn't that page somewhat stale?

Re: [PATCH] stripspace: add --line-count flag

2016-03-04 Thread Sidhant Sharma
> builtin/stripspace.c | 22 +- > git-rebase--interactive.sh | 6 +++--- > 2 files changed, 24 insertions(+), 4 deletions(-) > This is my first attempt at the small project listed here:

[PATCH] stripspace: add --line-count flag

2016-03-04 Thread Sidhant Sharma [:tk]
When used, this flag outputs number of lines after stripspace has removed trailing whitespace. With `--line-count`, git-rebase--interactive.sh need not rely on `wc -l` for line count. Signed-off-by: Sidhant Sharma [:tk] --- This the first version of the patch for the

Re: [PATCH 2/2] t5510: do not leave changed cwd

2016-03-04 Thread Junio C Hamano
Michael J Gruber writes: > Jeff King venit, vidit, dixit 04.03.2016 12:52: >> On Fri, Mar 04, 2016 at 11:53:50AM +0100, Michael J Gruber wrote: >> >>> t5510 carefully keeps the cwd at the test root by using either subshells >>> or explicit cd'ing back to the root. Use

Re: git diff does not precompose unicode file paths (OS X)

2016-03-04 Thread Junio C Hamano
Alexander Rinass writes: > Sticking a precompose_argv(argc, argv) into diff.c’s cmd_diff > function fixes the issue. > > But I had to disable the check (precomposed_unicode != 1) in > precompose_argv to make it work. That’s probably because > precompose_argv is usually called

Re: [PATCH] t9700: fix test for perl older than 5.14

2016-03-04 Thread Junio C Hamano
Jeff King writes: > One workaround would therefore be for him to tweak PERL_PATH, but > obviously that does not help anyone else. I think we should do this: > > -- >8 -- > Subject: t9700: fix test for perl older than 5.14 > > Commit d53c2c6 (mingw: fix t9700's assumption about >

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Junio C Hamano
Duy Nguyen writes: > On Fri, Mar 4, 2016 at 6:56 PM, Kevin Daudt wrote: >> Verified that it's different in 2.7.0, but 2.7.2 gives expected output. > > Thanks. 2.7.1 reverts the faulty commit from 2.7.0 that generated two > other regression reports before this

Re: [PATCH] t9700: fix test for perl older than 5.14

2016-03-04 Thread Johannes Schindelin
Hi Peff, On Fri, 4 Mar 2016, Jeff King wrote: > Subject: t9700: fix test for perl older than 5.14 > > Commit d53c2c6 (mingw: fix t9700's assumption about > directory separators, 2016-01-27) uses perl's "/r" regex > modifier to do a non-destructive replacement on a string, > leaving the original

Re: [PATCH v3 3/3] Documentation/git-pull: document --[no-]autostash option

2016-03-04 Thread Paul Tan
On Fri, Mar 4, 2016 at 12:13 AM, Mehul Jain wrote: > Signed-off-by: Mehul Jain > --- > Documentation/git-pull.txt | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt

Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-04 Thread Paul Tan
On Fri, Mar 4, 2016 at 12:13 AM, Mehul Jain wrote: > diff --git a/builtin/pull.c b/builtin/pull.c > index 10eff03..b338b83 100644 > --- a/builtin/pull.c > +++ b/builtin/pull.c > @@ -85,6 +85,7 @@ static char *opt_squash; > static char *opt_commit; > static char

Re: [PATCH] index-pack: --clone-bundle option

2016-03-04 Thread Jeff King
On Thu, Mar 03, 2016 at 03:20:20PM -0800, Junio C Hamano wrote: > Junio C Hamano writes: > > > Note that this name choice does not matter very much in the larger > > picture. As an initial clone that bootstraps from a clone-bundle is > > expected to do a rough equivalent of:

Re: [PATCH] index-pack: --clone-bundle option

2016-03-04 Thread Jeff King
On Thu, Mar 03, 2016 at 02:57:08PM -0800, Junio C Hamano wrote: > Teach a new option "--clone-bundle" to "git index-pack" to create a > split bundle file that uses an existing packfile as its data part. > > The expected "typical" preparation for helping initial clone would > start by preparing a

Re: git diff does not precompose unicode file paths (OS X)

2016-03-04 Thread Alexander Rinass
> On 04 Mar 2016, at 13:16, Torsten Bögershausen wrote: > > On 03/04/2016 10:07 AM, Alexander Rinass wrote: >> Hallo, >> >> It appears that the git diff command does not precompose file path >> arguments, even if the option core.precomposeunicode is set to true (which >> is

Re: [PATCH 1/2] test-lib: quote TRASH_DIRECTORY

2016-03-04 Thread Jeff King
On Fri, Mar 04, 2016 at 02:03:15PM +0100, Michael J Gruber wrote: > >> -test ! -z "$debug" || remove_trash=$TRASH_DIRECTORY > >> +test ! -z "$debug" || remove_trash="$TRASH_DIRECTORY" > > > > I don't think this does anything. The shell doesn't do whitespace > > splitting on the right-hand side

Re: [PATCH 2/2] t5510: do not leave changed cwd

2016-03-04 Thread Michael J Gruber
Jeff King venit, vidit, dixit 04.03.2016 12:52: > On Fri, Mar 04, 2016 at 11:53:50AM +0100, Michael J Gruber wrote: > >> t5510 carefully keeps the cwd at the test root by using either subshells >> or explicit cd'ing back to the root. Use a subshell for the last >> subtest, too. > > I doubt this

Re: [PATCH 1/2] test-lib: quote TRASH_DIRECTORY

2016-03-04 Thread Michael J Gruber
Jeff King venit, vidit, dixit 04.03.2016 12:51: > On Fri, Mar 04, 2016 at 11:53:49AM +0100, Michael J Gruber wrote: > >> We always quote $TRASH_DIRECTORY to guard against funky path names. Do >> so in one more spot >> >> Signed-off-by: Michael J Gruber >> --- >>

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Duy Nguyen
On Fri, Mar 4, 2016 at 6:56 PM, Kevin Daudt wrote: > Verified that it's different in 2.7.0, but 2.7.2 gives expected output. Thanks. 2.7.1 reverts the faulty commit from 2.7.0 that generated two other regression reports before this one. I guess it's all good then (except for the

Re: [PATCH] t9700: fix test for perl older than 5.14

2016-03-04 Thread Dennis Kaarsemaker
On vr, 2016-03-04 at 06:43 -0500, Jeff King wrote: > On Fri, Mar 04, 2016 at 11:58:24AM +0100, Dennis Kaarsemaker wrote: > > > On vr, 2016-03-04 at 03:56 -0500, Jeff King wrote: > > > ? Those are just guesses, but if we are tickling a bug in perl's parser, > > > this might avoid them. I also

Re: git diff does not precompose unicode file paths (OS X)

2016-03-04 Thread Torsten Bögershausen
On 03/04/2016 10:07 AM, Alexander Rinass wrote: Hallo, It appears that the git diff command does not precompose file path arguments, even if the option core.precomposeunicode is set to true (which is the default on OS X). Passing the decomposed form of a file path to the git diff command

Re: Change in .gitignore handling: intended or bug?

2016-03-04 Thread Kevin Daudt
On Fri, Mar 04, 2016 at 01:12:37AM -0500, Charles Strahan wrote: > I'm on 2.7.0. > > Here's a quick sanity check: > > ├── baz > │   ├── quux > │   │   ├── corge > │   │   │   └── wibble.txt > │   │   └── grault.txt > │   └── waldo.txt > └── foo > ├── bar.txt > └── garply.txt > > $ git

Re: [PATCH 2/2] t5510: do not leave changed cwd

2016-03-04 Thread Jeff King
On Fri, Mar 04, 2016 at 11:53:50AM +0100, Michael J Gruber wrote: > t5510 carefully keeps the cwd at the test root by using either subshells > or explicit cd'ing back to the root. Use a subshell for the last > subtest, too. I doubt this caused the heisenbug you saw, as we should have an absolute

Re: [PATCH 1/2] test-lib: quote TRASH_DIRECTORY

2016-03-04 Thread Jeff King
On Fri, Mar 04, 2016 at 11:53:49AM +0100, Michael J Gruber wrote: > We always quote $TRASH_DIRECTORY to guard against funky path names. Do > so in one more spot > > Signed-off-by: Michael J Gruber > --- > t/test-lib.sh | 2 +- > 1 file changed, 1 insertion(+), 1

Re: t9700-perl-git.sh is broken on some configurations

2016-03-04 Thread Jeff King
On Fri, Mar 04, 2016 at 11:30:36AM +0100, Christian Couder wrote: > > Those are just guesses, but if we are tickling a bug in perl's parser, > > this might avoid them. I also wondered when "/r" appeared. It was in > > 5.14, so you're presumably good there. > > If I just remove the "r" at the end

[PATCH] t9700: fix test for perl older than 5.14

2016-03-04 Thread Jeff King
On Fri, Mar 04, 2016 at 11:58:24AM +0100, Dennis Kaarsemaker wrote: > On vr, 2016-03-04 at 03:56 -0500, Jeff King wrote: > > ? Those are just guesses, but if we are tickling a bug in perl's parser, > > this might avoid them. I also wondered when "/r" appeared. It was in > > 5.14, so you're

Re: t9700-perl-git.sh is broken on some configurations

2016-03-04 Thread Dennis Kaarsemaker
On vr, 2016-03-04 at 03:56 -0500, Jeff King wrote: > ? Those are just guesses, but if we are tickling a bug in perl's parser, > this might avoid them. I also wondered when "/r" appeared. It was in > 5.14, so you're presumably good there. The "use" statement at the top of > the script says "5.008",

[PATCH/RFC 0/2] Test trash dir sanitizing

2016-03-04 Thread Michael J Gruber
I encountered a Heisenbug[*] where t5510 would leave its trash directory without cleanup, though not reproducibly so. This mini series cleans up two spots which may or may not be related, but should be goog cleanup anyways. [*] Running tests with prove -j4. Michael J Gruber (2): test-lib:

[PATCH 1/2] test-lib: quote TRASH_DIRECTORY

2016-03-04 Thread Michael J Gruber
We always quote $TRASH_DIRECTORY to guard against funky path names. Do so in one more spot Signed-off-by: Michael J Gruber --- t/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 0b47eb6..8957916 100644

[PATCH 2/2] t5510: do not leave changed cwd

2016-03-04 Thread Michael J Gruber
t5510 carefully keeps the cwd at the test root by using either subshells or explicit cd'ing back to the root. Use a subshell for the last subtest, too. Signed-off-by: Michael J Gruber --- t/t5510-fetch.sh | 10 ++ 1 file changed, 6 insertions(+), 4

Re: t9700-perl-git.sh is broken on some configurations

2016-03-04 Thread Christian Couder
On Fri, Mar 4, 2016 at 9:56 AM, Jeff King wrote: > On Fri, Mar 04, 2016 at 09:13:51AM +0100, Christian Couder wrote: > >> Indeed on the command line I get: >> >> >> $ t/t9700/test.pl >> ok 2 - use Git; >> Bareword found where operator expected at

git diff does not precompose unicode file paths (OS X)

2016-03-04 Thread Alexander Rinass
Hallo, It appears that the git diff command does not precompose file path arguments, even if the option core.precomposeunicode is set to true (which is the default on OS X). Passing the decomposed form of a file path to the git diff command will yield no diff for a modified file. In my case,

Re: t9700-perl-git.sh is broken on some configurations

2016-03-04 Thread Jeff King
On Fri, Mar 04, 2016 at 09:13:51AM +0100, Christian Couder wrote: > Indeed on the command line I get: > > > $ t/t9700/test.pl > ok 2 - use Git; > Bareword found where operator expected at t/t9700/test.pl line 36, > near "s/\\/\//gr" > syntax error at t/t9700/test.pl line

t9700-perl-git.sh is broken on some configurations

2016-03-04 Thread Christian Couder
Hi, It looks like t9700-perl-git.sh is broken on one machine I use but not on my laptop since commit d53c2c67380f769f91fd45cc8c63a5883245ccca (mingw: fix t9700's assumption about directory separators, Jan 27 17:19:56 2016). I get: Initialized empty Git repository in