[PATCH] branch doc: remove --set-upstream from synopsis

2017-11-15 Thread Todd Zullinger
Support for the --set-upstream option was removed in 52668846ea (builtin/branch: stop supporting the "--set-upstream" option, 2017-08-17), after a long deprecation period. Remove the option from the command synopsis for consistency. Replace another reference to it in the description of

[PATCH] launch_editor(): indicate that Git waits for user input

2017-11-15 Thread Junio C Hamano
When a graphical GIT_EDITOR is spawned by a Git command that opens and waits for it for the user input (e.g. "git rebase -i") pops its window elsewhere that is obscure, the user may be left staring the original terminal window s/he invoked the Git command from, without even realizing that now s/he

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Junio C Hamano
Junio C Hamano writes: > I wonder if we can do something like > ... > to tentatively give a message without permanently wasting the > vertical space. Learning from 13e4760a ("recv_sideband: Do not use ANSI escape sequence on dumb terminals.", 2008-01-08), I think the above

Re: [PATCH] config: avoid "write_in_full(fd, buf, len) != len" pattern

2017-11-15 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > As explained in commit 06f46f237 (avoid "write_in_full(fd, buf, len) > != len" pattern, 2017–09–13) the return value of write_in_full() is > either -1 or the requested number of bytes. As such

[PATCH v2] sequencer: reschedule pick if index can't be locked

2017-11-15 Thread Junio C Hamano
From: Phillip Wood Date: Wed, 15 Nov 2017 10:41:25 + If the index cannot be locked in do_recursive_merge(), issue an error message and go on to the error recovery codepath, instead of dying. When the commit cannot be picked, it needs to be rescheduled when

Usability suggestion: Catch `git commit -amend`

2017-11-15 Thread Ryan Govostes
Despite being a native English speaker, I've often typo'd when trying to invoke `git commit --amend`. Recently I wrote `git commit -ammend` which of course added everything to the commit and attached the commit message "mend". This doesn't seem to be an uncommon error, there are 64,000 commits

Re: [PATCH 27/30] merge-recursive: Apply necessary modifications for directory renames

2017-11-15 Thread Elijah Newren
On Wed, Nov 15, 2017 at 12:23 PM, Stefan Beller wrote: >> + if (!strcmp(pair->one->path, pair->two->path)) { >> + /* >> +* Paths should only match if this was initially a >> +* non-rename that

Re: [PATCHv5 7/7] builtin/describe.c: describe a blob

2017-11-15 Thread Junio C Hamano
Stefan Beller writes: > When describing commits, we try to anchor them to tags or refs, as these > are conceptually on a higher level than the commit. And if there is no ref > or tag that matches exactly, we're out of luck. So we employ a heuristic > to make up a name for

Re: [PATCHv4 7/7] builtin/describe.c: describe a blob

2017-11-15 Thread Junio C Hamano
Stefan Beller writes: > grep "fatal: test-blob-1 is neither a commit nor blob" actual OK, that might be somewhat unsatisfying from end-user's point of view (logically "test-blob-1" is already a name based on the 'graph relations' that is satisfactory). [side

[PATCHv5 7/7] builtin/describe.c: describe a blob

2017-11-15 Thread Stefan Beller
Sometimes users are given a hash of an object and they want to identify it further (ex.: Use verify-pack to find the largest blobs, but what are these? or [1]) When describing commits, we try to anchor them to tags or refs, as these are conceptually on a higher level than the commit. And if there

[PATCHv5 4/7] builtin/describe.c: rename `oid` to avoid variable shadowing

2017-11-15 Thread Stefan Beller
The function `describe` has already a variable named `oid` declared at the beginning of the function for an object id. Do not shadow that variable with a pointer to an object id. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano ---

[PATCHv5 2/7] list-objects.c: factor out traverse_trees_and_blobs

2017-11-15 Thread Stefan Beller
With traverse_trees_and_blobs factored out of the main traverse function, the next patch can introduce an in-order revision walking with ease. In the next patch we'll call `traverse_trees_and_blobs` from within the loop walking the commits, such that we'll have one invocation of that function per

[PATCHv5 6/7] builtin/describe.c: factor out describe_commit

2017-11-15 Thread Stefan Beller
Factor out describing commits into its own function `describe_commit`, which will put any output to stdout into a strbuf, to be printed afterwards. As the next patch will teach Git to describe blobs using a commit and path, this refactor will make it easy to reuse the code describing commits.

[PATCHv5 0/7] describe blob

2017-11-15 Thread Stefan Beller
Thanks Jonathan and Junio for the patient review! * fixed issues brought up in the last patch, see interdiff below. (I found that walking from so many refs as starting points was the source of confusion, hence we only want to walk from HEAD * reworded commit messages from earlier patches *

[PATCHv5 3/7] revision.h: introduce blob/tree walking in order of the commits

2017-11-15 Thread Stefan Beller
The functionality to list tree objects in the order they were seen while traversing the commits will be used in one of the next commits, where we teach `git describe` to describe not only commits, but blobs, too. The change in list-objects.c is rather minimal as we'll be re-using the

[PATCHv5 5/7] builtin/describe.c: print debug statements earlier

2017-11-15 Thread Stefan Beller
When debugging, print the received argument at the start of the function instead of in the middle. This ensures that the received argument is printed in all code paths, and also allows a subsequent refactoring to not need to move the "arg" parameter. Signed-off-by: Stefan Beller

[PATCHv5 1/7] t6120: fix typo in test name

2017-11-15 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- t/t6120-describe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 1c0e8659d9..c8b7ed82d9 100755 --- a/t/t6120-describe.sh

Re: [PATCHv4 7/7] builtin/describe.c: describe a blob

2017-11-15 Thread Stefan Beller
> > Give an object a human readable name based on an available ref > > or something like that? will use > Or a sentence in BUGS section. will add. > A case (or two) I find more interesting is to see how the code > behaves against these: > > git tag -a -m "annotated blob" a-blob

Re: [PATCH] Makefile: check that tcl/tk is installed

2017-11-15 Thread Junio C Hamano
Christian Couder writes: > To improve the current behavior when Tcl/Tk is not installed, > let's just check that TCLTK_PATH points to something and error > out right away if this is not the case. > > This should benefit people who actually want to install and use >

Re: [PATCHv4 7/7] builtin/describe.c: describe a blob

2017-11-15 Thread Stefan Beller
On Tue, Nov 14, 2017 at 5:52 PM, Jonathan Tan wrote: > On Tue, 14 Nov 2017 16:30:43 -0800 > Stefan Beller wrote: > >> The walking is performed in reverse order to show the introduction of a >> blob rather than its last occurrence. > > The code as

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2017-11-15 Thread Luke Diamand
On 15 November 2017 at 22:08, Junio C Hamano wrote: > Luke Diamand writes: > >> Quite a few of the worktrees have expired - their head revision has >> been GC'd and no longer points to anything sensible >> (gc.worktreePruneExpire). The function

Re: [PATCH V3] config: add --expiry-date

2017-11-15 Thread Junio C Hamano
h...@unimetic.com writes: > From: Haaris Mehmood > > Add --expiry-date as a data-type for config files when > 'git config --get' is used. This will return any relative > or fixed dates from config files as a timestamp value. > > This is useful for scripts (e.g.

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Stefan Beller
On Wed, Nov 15, 2017 at 4:33 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> I wonder if we can do something like >>> >>> git_spawn_editor() >>> { >>> const char *EL = "\033[K"; /* Erase in Line */ >>> >>>

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Junio C Hamano
Stefan Beller writes: >> I wonder if we can do something like >> >> git_spawn_editor() >> { >> const char *EL = "\033[K"; /* Erase in Line */ >> >> /* notice the lack of terminating LF */ >> fprintf(stderr,

Git on Mac - Segmentation fault:11

2017-11-15 Thread Frank Burkitt
I am using Git on a Macbook pro with MacOS High Sierra version 10.13.1 (17B48). I have been using it in a virtualenv with python 3. I have begun to get "Segmentation fault: 11" with every git command. I have been searching for a reason why this is occurring but have not been able to find a

Re: [Feature- Request] Option to commit after checking out branch command is made

2017-11-15 Thread Junio C Hamano
Ninivaggi Mattia writes: > 1. I checkout a branch, without having commited first > > git checkout dev > 2. I get this error message: > > error: Your local changes to the following files would be overwritten > by checkout: > > // List of files > > //

[PATCH V3] config: add --expiry-date

2017-11-15 Thread hsed
From: Haaris Mehmood Add --expiry-date as a data-type for config files when 'git config --get' is used. This will return any relative or fixed dates from config files as a timestamp value. This is useful for scripts (e.g. gc.reflogexpire) that work with timestamps so that

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Stefan Beller
On Wed, Nov 15, 2017 at 2:32 PM, Junio C Hamano wrote: > Lars Schneider writes: > >> However, if you configure an editor that runs outside your terminal window >> then >> you might run into the following problem: >> Git opens the editor but the

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Junio C Hamano
Lars Schneider writes: > However, if you configure an editor that runs outside your terminal window > then > you might run into the following problem: > Git opens the editor but the editor is the background or on another screen > and > consequently you don't see the

[PATCH 3/4] branch: correctly reject refs/heads/{-dash,HEAD}

2017-11-15 Thread Junio C Hamano
strbuf_check_branch_ref() is the central place where many codepaths see if a proposed name is suitable for the name of a branch. It was designed to allow us to get stricter than the check_refname_format() check used for refnames in general, and we already use it to reject a branch whose name

Re: [PATCH V2] config: add --expiry-date

2017-11-15 Thread hsed
On 2017-11-14 06:38, Junio C Hamano wrote: h...@unimetic.com writes: From: Haaris Description: This patch adds a new option to the config command. ... Motivation: A parse_expiry_date() function already existed for api calls, this patch simply allows the function to be

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2017-11-15 Thread Junio C Hamano
Luke Diamand writes: > Quite a few of the worktrees have expired - their head revision has > been GC'd and no longer points to anything sensible > (gc.worktreePruneExpire). The function other_head_refs() in worktree.c > bails out if there's an error, which I think is the

Re: [PATCH] sequencer: reschedule pick if index can't be locked

2017-11-15 Thread Johannes Schindelin
Hi Phillip, On Wed, 15 Nov 2017, Phillip Wood wrote: > diff --git a/sequencer.c b/sequencer.c > index > 6d027b06c8d8dc69b14d05752637a65aa121ab24..8c10442b84068d3fb7ec809ef1faa0203cb83e60 > 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -438,7 +438,8 @@ static int do_recursive_merge(struct

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

2017-11-15 Thread Luke Diamand
+Jeff King On 13 November 2017 at 22:15, Stefan Beller wrote: > On Mon, Nov 13, 2017 at 2:03 PM, Luke Diamand wrote: >> On 13 November 2017 at 19:51, Luke Diamand wrote: >>> Hi! >>> >>> I think there may be a regression caused by this

Re: [PATCH] notes: send "Automatic notes merge failed" messages to stderr

2017-11-15 Thread Todd Zullinger
Johan Herland wrote: On Tue, Nov 14, 2017 at 5:17 PM, Todd Zullinger wrote: All other error messages from notes use stderr. Do the same when alerting users of an unresolved notes merge. Fix the output redirection in t3310 and t3320 as well. Previously, the tests directed

Re: [PATCH 1/5] connect: split git:// setup into a separate function

2017-11-15 Thread Jonathan Nieder
Hi, On Oct 24, 2017, Junio C Hamano wrote: > Jonathan Nieder writes: >> +static struct child_process *git_connect_git(int fd[2], char *hostandport, >> + const char *path, const char *prog, >> +

Re: [PATCH 27/30] merge-recursive: Apply necessary modifications for directory renames

2017-11-15 Thread Stefan Beller
> + if (!strcmp(pair->one->path, pair->two->path)) { > + /* > +* Paths should only match if this was initially a > +* non-rename that is being turned into one by > +* directory rename

Re: [PATCH 12/30] directory rename detection: miscellaneous testcases to complete coverage

2017-11-15 Thread Stefan Beller
On Fri, Nov 10, 2017 at 11:05 AM, Elijah Newren wrote: > +### > +# SECTION 9: Other testcases > +# > +# I came up with the testcases in the first eight sections before coding up > +# the implementation.

Re: [PATCH] Reduce performance penalty for turned off traces

2017-11-15 Thread Stefan Beller
On Sun, Nov 12, 2017 at 6:17 AM, Jeff King wrote: > On Sat, Nov 11, 2017 at 07:28:58PM +, gennady.kup...@gmail.com wrote: > >> From: Gennady Kupava >> >> Signed-off-by: Gennady Kupava > > Thanks, and welcome to the list. Welcome

Re: Changing encoding of a file : What should happen to CRLF in file ?

2017-11-15 Thread Ashish Negi
On windows : > git --version git version 2.14.2.windows.2 On linux : > git --version git version 2.7.4 I would like to understand the solution : If i understood it correctly : it removes file_name.txt from index, so git forgets about it. we then add the file again after changing encoding. This

Re: [PATCH] sequencer: reschedule pick if index can't be locked

2017-11-15 Thread Martin Ågren
On 15 November 2017 at 11:41, Phillip Wood wrote: > From: Phillip Wood > > Return an error instead of dying if the index cannot be locked in > do_recursive_merge() as if the commit cannot be picked it needs to be > rescheduled when

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Stefan Beller
On Wed, Nov 15, 2017 at 10:07 AM, Lars Schneider wrote: >> Can this be put in a wrapper that opens the text editor? >> The wrapper would print these lines and then open the text editor; >> depending on the operating system, there might even be a command to >> focus on

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Lars Schneider
> On 15 Nov 2017, at 18:51, Stefan Beller wrote: > > On Wed, Nov 15, 2017 at 7:08 AM, Lars Schneider > wrote: >> Hi, >> >> Git gathers user input via text editor in certain commands (e.g. "git >> commit"). >> If you configure a text based editor,

Re: [RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Stefan Beller
On Wed, Nov 15, 2017 at 7:08 AM, Lars Schneider wrote: > Hi, > > Git gathers user input via text editor in certain commands (e.g. "git > commit"). > If you configure a text based editor, such as vi, then this works great as the > editor is opened in your terminal window

Re: submodules and merging (Was: Re: [PATCH 02/30] merge-recursive: Fix logic ordering issue)

2017-11-15 Thread Jacob Keller
On Tue, Nov 14, 2017 at 10:13 AM, Stefan Beller wrote: > Thanks for your reply! > > On Tue, Nov 14, 2017 at 9:17 AM, Elijah Newren wrote: >> On Mon, Nov 13, 2017 at 3:46 PM, Stefan Beller wrote: >>> On Mon, Nov 13, 2017 at 3:39 PM,

Re: Changing encoding of a file : What should happen to CRLF in file ?

2017-11-15 Thread Torsten Bögershausen
On Wed, Nov 15, 2017 at 01:41:42PM +0530, Ashish Negi wrote: > > If you commit the file, it will be stored with LF in the index, > This is what i believe is not happening. > > Lets do this with a public repository and steps which are reproducible. > I have created a repo :

Re: [PATCH v2 1/2] branch: forbid refs/heads/HEAD

2017-11-15 Thread Kaartic Sivaraam
On Tuesday 14 November 2017 08:38 PM, Junio C Hamano wrote: Kaartic Sivaraam writes: I should have been a little more clear with the numbering, sorry. The correct prefix should have been as follows, * [PATCH v2 1/2] --> [PATCH v2 3/3] * [PATCH v2 1/2] -->

[Feature- Request] Option to commit after checking out branch command is made

2017-11-15 Thread Ninivaggi Mattia
Hey guys Sometimes I tend to forget to commit changes before I checkout another branch and the following scenario happens (via cli on windows [with git bash]): 1. I checkout a branch, without having commited first > git checkout dev 2. I get this error message: > error: Your local

[RFC] Indicate that Git waits for user input via editor

2017-11-15 Thread Lars Schneider
Hi, Git gathers user input via text editor in certain commands (e.g. "git commit"). If you configure a text based editor, such as vi, then this works great as the editor is opened in your terminal window in the foreground and in focus. However, if you configure an editor that runs outside your

Re: [PATCH] notes: send "Automatic notes merge failed" messages to stderr

2017-11-15 Thread Johan Herland
On Tue, Nov 14, 2017 at 5:17 PM, Todd Zullinger wrote: > All other error messages from notes use stderr. Do the same when > alerting users of an unresolved notes merge. > > Fix the output redirection in t3310 and t3320 as well. Previously, the > tests directed output to a file,

[PATCH] Makefile: check that tcl/tk is installed

2017-11-15 Thread Christian Couder
By default running `make install` in the root directory of the project will set TCLTK_PATH to `wish` and then go into the "git-gui" and "gitk-git" sub-directories to build and install these 2 sub-projects. When Tcl/Tk is not installed, the above will succeed if gettext is installed, as Tcl/Tk is

[PATCH] config: avoid "write_in_full(fd, buf, len) != len" pattern

2017-11-15 Thread Phillip Wood
From: Phillip Wood As explained in commit 06f46f237 (avoid "write_in_full(fd, buf, len) != len" pattern, 2017–09–13) the return value of write_in_full() is either -1 or the requested number of bytes. As such comparing the return value to an unsigned value such as

Dear Friend,

2017-11-15 Thread Dao Alpha
Dear Friend, My Seasons of greetings to you and your family. First, I am Mr. Dao ALPHA, a banker working with Bank of Africa here in my country Burkina Faso West Africa, and I have a business transaction that will benefit both of us, and want to know if you can handle and claim the fund to your

[PATCH] sequencer: reschedule pick if index can't be locked

2017-11-15 Thread Phillip Wood
From: Phillip Wood Return an error instead of dying if the index cannot be locked in do_recursive_merge() as if the commit cannot be picked it needs to be rescheduled when performing an interactive rebase. If the pick is not rescheduled and the user runs 'git rebase

(From: Mr.James Tan (Urgent & Confidential)

2017-11-15 Thread James Tan
-- (From: Mr.James Tan (Urgent & Confidential) Good Day, Please Read. My name is Mr.James Tan , I am the Bill and Exchange manager here in Bank of Africa (BOA) Lome-Togo.West-Africa. I have a business proposal in the tune of $9.7m, (Nine Million Seven Hundred Thousand Dollars Only) after the

Re: [PATCH v1 2/2] worktree: make add dwim

2017-11-15 Thread Eric Sunshine
On Wed, Nov 15, 2017 at 3:50 AM, Thomas Gummerer wrote: > On 11/14, Eric Sunshine wrote: >> git worktree add ../topic >> [...] >> The desired new DWIMing would change the second bullet point to: >> >> * If no local branch named "topic" exists, DWIM it from "origin/topic" >>

Re: [PATCH v1 2/2] worktree: make add dwim

2017-11-15 Thread Thomas Gummerer
On 11/14, Eric Sunshine wrote: > On Tue, Nov 14, 2017 at 3:14 PM, Eric Sunshine > wrote: > > For my own edification... > > [...] > > git worktree add ../topic > > > > * Correctly errors out, refusing to create a new branch named "topic", > > if "topic" is already a

Re: [PATCH v1 2/2] worktree: make add dwim

2017-11-15 Thread Thomas Gummerer
On 11/14, Eric Sunshine wrote: > On Tue, Nov 14, 2017 at 3:45 AM, Thomas Gummerer wrote: > > On 11/13, Junio C Hamano wrote: > >> If so, as long as the new DWIM kicks in ONLY when "topic" does not > >> exist, I suspect that there is no backward compatibility worries. > >>

Re: Changing encoding of a file : What should happen to CRLF in file ?

2017-11-15 Thread Ashish Negi
> If you commit the file, it will be stored with LF in the index, This is what i believe is not happening. Lets do this with a public repository and steps which are reproducible. I have created a repo : https://github.com/ashishnegi/git_encoding If you clone this repo in linux and run `git