summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Documentation: fix typo 'In such these cases'rn/glossary-typofixRené Nyffenegger2016-05-021-1/+1
| | | | | Signed-off-by: René Nyffenegger <mail@renenyffenegger.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Change "tracking branch" to "remote-tracking branch"Matthieu Moy2010-11-0310-24/+24
| | | | | | | | | One more step towards consistancy. We change the documentation and the C code in a single patch, since the only instances in the C code are in comment and usage strings. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* everyday.txt: change "tracking branch" to "remote-tracking branch"Matthieu Moy2010-11-031-3/+3
| | | | | Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Change remote tracking to remote-tracking in non-trivial placesMatthieu Moy2010-11-033-6/+6
| | | | | | | | To complement the straightforward perl application in previous patch, this adds a few manual changes. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Replace "remote tracking" with "remote-tracking"Matthieu Moy2010-11-0310-11/+11
| | | | | | | | | | | | | | | | | | "remote-tracking" branch makes it explicit that the branch is "tracking a remote", as opposed to "remote, and tracking something". See discussion in e.g. http://mid.gmane.org/8835ADF9-45E5-4A26-9F7F-A72ECC065BB2@gmail.com for more details. This patch is a straightforward application of perl -pi -e 's/remote tracking branch/remote-tracking branch/' except in the RelNotes directory. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Better "Changed but not updated" message in git-statusMatthieu Moy2010-11-033-19/+19
| | | | | | | | | Older Gits talked about "updating" a file to add its content to the index, but this terminology is confusing for new users. "to stage" is far more intuitive and already used in e.g. the "git stage" command name. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'ab/send-email-perl'Junio C Hamano2010-10-262-40/+36
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ab/send-email-perl: send-email: extract_valid_address use qr// regexes send-email: is_rfc2047_quoted use qr// regexes send-email: use Perl idioms in while loop send-email: make_message_id use "require" instead of "use" send-email: send_message die on $!, not $? send-email: use (?:) instead of () if no match variables are needed send-email: sanitize_address use qq["foo"], not "\"foo\"" send-email: sanitize_address use $foo, not "$foo" send-email: use \E***\Q instead of \*\*\* send-email: cleanup_compose_files doesn't need a prototype send-email: unique_email_list doesn't need a prototype send-email: file_declares_8bit_cte doesn't need a prototype send-email: get_patch_subject doesn't need a prototype send-email: use lexical filehandles during sending send-email: use lexical filehandles for $compose send-email: use lexical filehandle for opendir Conflicts: git-send-email.perl
| * send-email: extract_valid_address use qr// regexesÆvar Arnfjörð Bjarmason2010-09-301-2/+2
| | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: is_rfc2047_quoted use qr// regexesÆvar Arnfjörð Bjarmason2010-09-301-2/+2
| | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: use Perl idioms in while loopÆvar Arnfjörð Bjarmason2010-09-302-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `while(<$fh>) { my $c = $_' to `while(my $c = <$fh>) {', and use `chomp $c' instead of `$c =~ s/\n$//g;', the two are equivalent in this case. I've also changed the --cccmd test so that we test for the stripping of whitespace at the beginning of the lines returned from the --cccmd. I think we probably shouldn't do this, but it was there already so I haven't changed the behavior. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: make_message_id use "require" instead of "use"Ævar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the use of Sys::Hostname from a "use" to a "require". The former happens in an implicit BEGIN block and is thus immune from the if block it's contained in, so it's always loaded. This should speed up the invocation of git-send-email by a few milliseconds. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: send_message die on $!, not $?Ævar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | If close fails we want to emit errno, not the return code of whatever happened to be the child process run. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: use (?:) instead of () if no match variables are neededÆvar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: sanitize_address use qq["foo"], not "\"foo\""Ævar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | Perl provides an alternate quote syntax which can make using "" inside interpolated strings easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: sanitize_address use $foo, not "$foo"Ævar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | There's no reason to explicitly stringify a variable in Perl unless it's an overloaded object and you want to call overload::StrVal, otherwise it's just creating a new scalar redundantly. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: use \E***\Q instead of \*\*\*Ævar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Change the regex introduced in a03bc5b to use the \E...\Q escape syntax instead of using backslashes. It's more readable like this, and easier to grep for. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: cleanup_compose_files doesn't need a prototypeÆvar Arnfjörð Bjarmason2010-09-301-3/+1
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: unique_email_list doesn't need a prototypeÆvar Arnfjörð Bjarmason2010-09-301-2/+1
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: file_declares_8bit_cte doesn't need a prototypeÆvar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: get_patch_subject doesn't need a prototypeÆvar Arnfjörð Bjarmason2010-09-301-1/+1
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: use lexical filehandles during sendingÆvar Arnfjörð Bjarmason2010-09-301-7/+7
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: use lexical filehandles for $composeÆvar Arnfjörð Bjarmason2010-09-301-11/+11
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: use lexical filehandle for opendirÆvar Arnfjörð Bjarmason2010-09-301-3/+3
| | | | | | | | | | | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'sb/send-email-use-to-from-input'Junio C Hamano2010-10-262-8/+56
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * sb/send-email-use-to-from-input: send-email: Don't leak To: headers between patches send-email: Use To: headers in patch files Conflicts: git-send-email.perl
| * | send-email: Don't leak To: headers between patchesStephen Boyd2010-10-042-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the first patch in a series has a To: header in the file and the second patch in the series doesn't the address from the first patch will be part of the To: addresses in the second patch. Fix this by treating the to list like the cc list. Have an initial to list come from the command line, user input and config options. Then build up a to list from each patch and concatenate the two together before sending the patch. Finally, reset the list after sending each patch so the To: headers from a patch don't get used for the next one. Reported-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | send-email: Use To: headers in patch filesStephen Boyd2010-09-292-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a minor annoyance when you take the painstaking time to setup To: headers for each patch in a large series, and then go out to send the series with git-send-email and watch git ignore the To: headers in the patch files. Therefore, always add To: headers from a patch file to the To: headers for that message. Keep the prompt for the blanket To: header so as to not break scripts (and user expectations). This means even if a patch has a To: header, git will prompt for the To: address. Otherwise, we'll need to introduce interface breakage to either request the header for each patch missing a To: header or default the header to whatever To: address is found first (be it in a patch or from user input). Both of these options don't seem very obvious/useful. Reported-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Stephen Boyd <bebarino@gmail.com> Tested-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'ab/require-perl-5.8'Junio C Hamano2010-10-2616-13/+27
|\ \ \ | | | | | | | | | | | | | | | | | | | | * ab/require-perl-5.8: perl: use "use warnings" instead of -w perl: bump the required Perl version to 5.8 from 5.6.[21]
| * | | perl: use "use warnings" instead of -wÆvar Arnfjörð Bjarmason2010-09-277-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the Perl scripts to turn on lexical warnings instead of setting the global $^W variable via the -w switch. The -w sets warnings for all code that interpreter runs, while "use warnings" is lexically scoped. The former is probably not what the authors wanted. As an auxiliary benefit it's now possible to build Git with: PERL_PATH='/usr/bin/env perl' Which would previously result in failures, since "#!/usr/bin/env perl -w" doesn't work as a shebang. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | perl: bump the required Perl version to 5.8 from 5.6.[21]Ævar Arnfjörð Bjarmason2010-09-2714-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Formalize our dependency on perl 5.8, bumped from 5.6.[12]. We already used the three-arg form of open() which was introduced in 5.6.1, but t/t9700/test.pl explicitly depended on 5.6.2. However git-add--interactive.pl has been failing on the 5.6 line since it was introduced in v1.5.0-rc0~12^2~2 back in 2006 due to this open syntax: sub run_cmd_pipe { my $fh = undef; open($fh, '-|', @_) or die; return <$fh>; } Which when executed dies on "Can't use an undefined value as filehandle reference". Several of our tests also fail on 5.6 (even more when compiled with NO_PERL_MAKEMAKER=1): t2016-checkout-patch.sh t3904-stash-patch.sh t3701-add-interactive.sh t7105-reset-patch.sh t7501-commit.sh t9700-perl-git.sh Our code is bitrotting on 5.6 with no-one interested in fixing it, and pinning us to such an ancient release of Perl is keeping us from using useful features introduced in the 5.8 release. The 5.6 series is now over 10 years old, and the 5.6.2 maintenance release almost 7. 5.8 on the other hand is more than 8 years old. All the modern Unix-like operating systems have now upgraded to it or a later version, and 5.8 packages are available for old IRIX, AIX Solaris and Tru64 systems. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Tor Arntsen <tor@spacetec.no> Acked-by: Randal L. Schwartz <merlyn@stonehenge.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'kb/merge-recursive-rename-threshold'Junio C Hamano2010-10-266-6/+41
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kb/merge-recursive-rename-threshold: diff: add synonyms for -M, -C, -B merge-recursive: option to specify rename threshold Conflicts: Documentation/diff-options.txt Documentation/merge-strategies.txt
| * | | | diff: add synonyms for -M, -C, -BKevin Ballard2010-09-292-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new long-form options --detect-renames[=<n>], --detect-copies[=<n>], and --break-rewrites[=[<n>][/<m>]] as synonyms for the -M, -C, and -B options (respectively). Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | merge-recursive: option to specify rename thresholdKevin Ballard2010-09-295-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recursive merge strategy turns on rename detection but leaves the rename threshold at the default. Add a strategy option to allow the user to specify a rename threshold to use. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jp/send-email-to-cmd'Junio C Hamano2010-10-263-18/+59
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jp/send-email-to-cmd: git-send-email.perl: Add --to-cmd Conflicts: git-send-email.perl
| * | | | | git-send-email.perl: Add --to-cmdJoe Perches2010-09-273-18/+59
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to use a command line --to-cmd=cmd to create the list of "To:" addresses. Used a shared routine for --cc-cmd and --to-cmd. Did not use IPC::Open2, leaving that for Ævar if ever he decides to fix the other bugs he might find. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'as/daemon-multi-listen'Junio C Hamano2010-10-262-27/+54
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * as/daemon-multi-listen: daemon: allow more than one host address given via --listen daemon: add helper function named_sock_setup
| * | | | | daemon: allow more than one host address given via --listenAlexander Sulfrian2010-09-282-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the host has more than one interfaces, daemon can listen to all of them by not giving any --listen option, or listen to only one. Teach it to accept more than one --listen options. Remove the hostname information form the die, if no socket could be created. It would only trigger when no interface out of either all interface or the ones specified on the command line with --listen options, can be listened to and so the user does know which "host" was asked. Signed-off-by: Alexander Sulfrian <alexander@sulfrian.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | daemon: add helper function named_sock_setupAlexander Sulfrian2010-09-281-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add named_sock_setup as helper function for socksetup to make it easier to create more than one listen sockets. named_sock_setup could be called more than one time and add the new sockets to the supplied socklist_p. Signed-off-by: Alexander Sulfrian <alexander@sulfrian.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'dm/mergetool-vimdiff'Junio C Hamano2010-10-261-10/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dm/mergetool-vimdiff: mergetool-lib: make the three-way diff the default for vim/gvim mergetool-lib: add a three-way diff view for vim/gvim mergetool-lib: combine vimdiff and gvimdiff run blocks
| * | | | | | mergetool-lib: make the three-way diff the default for vim/gvimDan McGee2010-09-291-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original vimdiff/gvimdiff configuration is now available by using 'vimdiff2' or 'gvimdiff2' as the preferred merge tool. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | mergetool-lib: add a three-way diff view for vim/gvimDan McGee2010-09-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the base version is available, use a three-way, four panel view by default. This shows the (local, base, remote) revisions up top and the merged result by itself in the lower pane. All revisions will still scroll together by default, and the cursor still defaults to the merged result edit pane. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | mergetool-lib: combine vimdiff and gvimdiff run blocksDan McGee2010-09-151-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are nearly identical outside of the foreground flag, which can safely be passed to both vim and gvim. The merge tool itself is named in $merge_tool_path. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'kf/post-receive-sample-hook'Junio C Hamano2010-10-261-16/+31
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kf/post-receive-sample-hook: post-receive-email: ensure sent messages are not empty
| * | | | | | | post-receive-email: ensure sent messages are not emptyKevin P. Fleming2010-09-101-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes the logic in the script to determine whether an email message will be sent before invoking the send_mail() function; otherwise, if the logic determines that a message will not be sent, send_mail() will cause an empty email to be sent. In addition, ensures that if multiple refs are updated and a message cannot be sent for one of them, the others are still processed normally. Signed-off-by: Kevin P. Fleming <kpfleming@digium.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jf/merge-ignore-ws'Junio C Hamano2010-10-2612-97/+351
|\ \ \ \ \ \ \ \ | | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jf/merge-ignore-ws: merge-recursive: options to ignore whitespace changes merge-recursive --patience ll-merge: replace flag argument with options struct merge-recursive: expose merge options for builtin merge
| * | | | | | | merge-recursive: options to ignore whitespace changesJustin Frankel2010-08-273-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for merging with ignoring line endings (specifically --ignore-space-at-eol) when using recursive merging. This is as a strategy-option, so that you can do: git merge --strategy-option=ignore-space-at-eol <branch> and git rebase --strategy-option=ignore-space-at-eol <branch> This can be useful for coping with line-ending damage (Xcode 3.1 has a nasty habit of converting all CRLFs to LFs, and VC6 tends to just use CRLFs for inserted lines). The only option I need is ignore-space-at-eol, but while at it, include the other xdiff whitespace options (ignore-space-change, ignore-all-space), too. [jn: with documentation] Signed-off-by: Justin Frankel <justin@cockos.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | merge-recursive --patienceJustin Frankel2010-08-266-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the merge-recursive strategy a --patience option to use the "patience diff" algorithm, which tends to improve results when cherry-picking a patch that reorders functions at the same time as refactoring them. To support this, struct merge_options and ll_merge_options gain an xdl_opts member, so programs can use arbitrary xdiff flags (think "XDF_IGNORE_WHITESPACE") in a git-aware merge. git merge and git rebase can be passed the -Xpatience option to use this. [jn: split from --ignore-space patch; with documentation] Signed-off-by: Justin Frankel <justin@cockos.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | ll-merge: replace flag argument with options structJonathan Nieder2010-08-267-66/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping track of the flag bits is proving more trouble than it's worth. Instead, use a pointer to an options struct like most similar APIs do. Callers with no special requests can pass NULL to request the default options. Cc: Bert Wesarg <bert.wesarg@googlemail.com> Cc: Avery Pennarun <apenwarr@gmail.com> Helped-by: Justin Frankel <justin@cockos.com> Helped-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | merge-recursive: expose merge options for builtin mergeJonathan Nieder2010-08-264-31/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two very similar blocks of code that recognize options for the "recursive" merge strategy. Unify them. No functional change intended. Cc: Avery Pennarun <apenwarr@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'ml/completion-zsh'Junio C Hamano2010-10-261-4/+46
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ml/completion-zsh: completion: make compatible with zsh
| * | | | | | | | completion: make compatible with zshMark Lodato2010-09-091-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify git-completion.bash so that it also works with zsh when using bashcompinit. In particular: declare -F Zsh doesn't have the same 'declare -F' as bash, but 'declare -f' is the same, and it works just as well for our purposes. ${var:2} Zsh does not implement ${var:2} to skip the first 2 characters, but ${var#??} works in both shells to replace the first 2 characters with nothing. Thanks to Jonathan Nieder for the suggestion. for (( n=1; "$n" ... )) Zsh does not allow "$var" in arithmetic loops. Instead, pre-compute the endpoint and use the variables without $'s or quotes. shopt Zsh uses 'setopt', which has a different syntax than 'shopt'. Since 'shopt' is used infrequently in git-completion, we provide a bare-bones emulation. emulate -L bash KSH_TYPESET Zsh offers bash emulation, which turns on a set of features to closely resemble bash. In particular, this enables SH_WORDSPLIT, which splits scalar variables on word boundaries in 'for' loops. We also need to set KSH_TYPESET, to fix "local var=$(echo foo bar)" issues. The last set of options are turned on only in _git and _gitk. Some of the sub-functions may not work correctly if called directly. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>