summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* configure.ac: check for HMAC_CTX_cleanuprh/autoconf-rhel3Reuben Hawkins2015-01-093-0/+13
| | | | | | | | | | OpenSSL version 0.9.6b and before defined the function HMAC_cleanup. Newer versions define HMAC_CTX_cleanup. Check for HMAC_CTX_cleanup and fall back to HMAC_cleanup when the newer function is missing. Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* configure.ac: check for clock_gettime and CLOCK_MONOTONICReuben Hawkins2015-01-094-1/+30
| | | | | | | | | | | | | Set or clear Makefile variables HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC based upon results of the checks (overriding default values from config.mak.uname). CLOCK_MONOTONIC isn't available on RHEL3, but there are still RHEL3 systems being used in production. Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* configure.ac: check 'tv_nsec' field in 'struct stat'Reuben Hawkins2015-01-091-0/+13
| | | | | | | | | | | | | | Detect 'tv_nsec' field in 'struct stat' and set Makefile variable NO_NSEC appropriately. A side-effect of the above detection is that we also determine whether 'stat.st_mtimespec' is available, so, as a bonus, set the Makefile variable USE_ST_TIMESPEC, as well. Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'sb/t5400-remove-unused'Junio C Hamano2015-01-071-15/+1
|\ | | | | | | | | * sb/t5400-remove-unused: t5400: remove dead code
| * t5400: remove dead codesb/t5400-remove-unusedStefan Beller2014-12-161-15/+1
| | | | | | | | | | Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'lh/send-email-hide-x-mailer'Junio C Hamano2015-01-074-3/+47
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | "git send-email" normally identifies itself via X-Mailer: header in the message it sends out. A new command line flag allows the user to squelch the header. * lh/send-email-hide-x-mailer: test/send-email: --[no-]xmailer tests send-email: add --[no-]xmailer option
| * | test/send-email: --[no-]xmailer testslh/send-email-hide-x-mailerLuis Henriques2014-12-151-0/+33
| | | | | | | | | | | | | | | | | | | | | Add tests for the --[no-]xmailer option. Signed-off-by: Luis Henriques <henrix@camandro.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | send-email: add --[no-]xmailer optionLuis Henriques2014-12-153-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add --[no-]xmailer that allows a user to disable adding the 'X-Mailer:' header to the email being sent. Signed-off-by: Luis Henriques <henrix@camandro.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rd/send-email-2047-fix'Junio C Hamano2015-01-072-11/+32
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git send-email" did not handle RFC 2047 encoded headers quite right. * rd/send-email-2047-fix: send-email: handle adjacent RFC 2047-encoded words properly send-email: align RFC 2047 decoding more closely with the spec
| * | | send-email: handle adjacent RFC 2047-encoded words properlyrd/send-email-2047-fixРоман Донченко2014-12-152-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RFC says that they are to be concatenated after decoding (i.e. the intervening whitespace is ignored). Signed-off-by: Роман Донченко <dpb@corrigendum.ru> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | send-email: align RFC 2047 decoding more closely with the specРоман Донченко2014-12-151-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More specifically: * Add "\" to the list of characters not allowed in a token (see RFC 2047 errata). * Share regexes between unquote_rfc2047 and is_rfc2047_quoted. Besides removing duplication, this also makes unquote_rfc2047 more stringent. * Allow both "q" and "Q" to identify the encoding. * Allow lowercase hexadecimal digits in the "Q" encoding. And, more on the cosmetic side: * Change the "encoded-text" regex to exclude rather than include characters, for clarity and consistency with "token". Signed-off-by: Роман Донченко <dpb@corrigendum.ru> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'pd/completion-filenames-fix'Junio C Hamano2015-01-072-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The top-of-the-file instruction for completion scripts (in contrib/) did not name the files correctly. * pd/completion-filenames-fix: Update documentation occurrences of filename .sh
| * | | | Update documentation occurrences of filename .shpd/completion-filenames-fixPeter van der Does2014-12-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation in the completion scripts for Bash and Zsh state the wrong filenames. Signed-off-by: Peter van der Does <peter@avirtualhome.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jk/add-i-read-error'Junio C Hamano2015-01-071-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git add -i" did not notice when the interactive command input stream went away and kept asking. * jk/add-i-read-error: add--interactive: leave main loop on read error
| * | | | | add--interactive: leave main loop on read errorjk/add-i-read-errorJeff King2014-12-151-0/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main hunk loop for add--interactive will loop if it does not get a known input. This is a good thing if the user typed some invalid input. However, if we have an uncorrectable read error, we'll end up looping infinitely. We can fix this by noticing read errors (i.e., <STDIN> returns undef) and breaking out of the loop. One easy way to trigger this is if you have an editor that does not take over the terminal (e.g., one that spawns a window in an existing process and waits), start the editor with the hunk-edit command, and hit ^C to send SIGINT. The editor process dies due to SIGINT, but the perl add--interactive process does not (perl suspends SIGINT for the duration of our system() call). We return to the main loop, but further reads from stdin don't work. The SIGINT _also_ killed our parent git process, which orphans our process group, meaning that further reads from the terminal will always fail. We loop infinitely, getting EIO on each read. Note that there are several other spots where we read from stdin, too. However, in each of those cases, we do something sane when the read returns undef (breaking out of the loop, taking the input as "no", etc). They don't need similar treatment. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jk/approxidate-avoid-y-d-m-over-future-dates'Junio C Hamano2015-01-072-9/+15
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally we tried to avoid interpreting date strings given by the user as future dates, e.g. GIT_COMMITTER_DATE=2014-12-10 when used early November 2014 was taken as "October 12, 2014" because it is likely that a date in the future, December 10, is a mistake. Loosen this and do not tiebreak by future-ness of the date when (1) ISO-like format is used, and (2) the string can make sense interpreted as both y-m-d and y-d-m. * jk/approxidate-avoid-y-d-m-over-future-dates: approxidate: allow ISO-like dates far in the future pass TIME_DATE_NOW to approxidate future-check
| * | | | | approxidate: allow ISO-like dates far in the futurejk/approxidate-avoid-y-d-m-over-future-datesJeff King2014-11-132-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are parsing approxidate strings and we find three numbers separate by one of ":/-.", we guess that it may be a date. We feed the numbers to match_multi_number, which checks whether it makes sense as a date in various orderings (e.g., dd/mm/yy or mm/dd/yy, etc). One of the checks we do is to see whether it is a date more than 10 days in the future. This was added in 38035cf (date parsing: be friendlier to our European friends., 2006-04-05), and lets us guess that if it is currently April 2014, then "10/03/2014" is probably March 10th, not October 3rd. This has a downside, though; if you want to be overly generous with your "--until" date specification, we may wrongly parse "2014-12-01" as "2014-01-12" (because the latter is an in-the-past date). If the year is a future year (i.e., both are future dates), it gets even weirder. Due to the vagaries of approxidate, months _after_ the current date (no matter the year) get flipped, but ones before do not. This patch drops the "in the future" check for dates of this form, letting us treat them always as yyyy-mm-dd, even if they are in the future. This does not affect the normal dd/mm/yyyy versus mm/dd/yyyy lookup, because this code path only kicks in when the first number is greater than 70 (i.e., it must be a year, and cannot be either a date or a month). The one possible casualty is that "yyyy-dd-mm" is less likely to be chosen over "yyyy-mm-dd". That's probably OK, though because: 1. The difference happens only when the date is in the future. Already we prefer yyyy-mm-dd for dates in the past. 2. It's unclear whether anybody even uses yyyy-dd-mm regularly. It does not appear in lists of common date formats in Wikipedia[1,2]. 3. Even if (2) is wrong, it is better to prefer ISO-like dates, as that is consistent with what we use elsewhere in git. [1] http://en.wikipedia.org/wiki/Date_and_time_representation_by_country [2] http://en.wikipedia.org/wiki/Calendar_date Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | pass TIME_DATE_NOW to approxidate future-checkJeff King2014-11-131-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The approxidate functions accept an extra "now" parameter to avoid calling time() themselves. We use this in our test suite to make sure we have a consistent time for computing relative dates. However, deep in the bowels of approxidate, we also call time() to check whether possible dates are far in the future. Let's make sure that the "now" override makes it to that spot, too, so we can consistently test that feature. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'br/imap-send-via-libcurl'Junio C Hamano2015-01-074-37/+191
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer libCurl knows how to talk IMAP; "git imap-send" has been updated to use this instead of a hand-rolled OpenSSL calls. * br/imap-send-via-libcurl: git-imap-send: use libcurl for implementation
| * | | | | | git-imap-send: use libcurl for implementationbr/imap-send-via-libcurlBernhard Reiter2014-11-104-37/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use libcurl's high-level API functions to implement git-imap-send instead of the previous low-level OpenSSL-based functions. Since version 7.30.0, libcurl's API has been able to communicate with IMAP servers. Using those high-level functions instead of the current ones would reduce imap-send.c by some 1200 lines of code. For now, the old ones are wrapped in #ifdefs, and the new functions are enabled by make if curl's version is >= 7.34.0, from which version on curl's CURLOPT_LOGIN_OPTIONS (enabling IMAP authentication) parameter has been available. The low-level functions will still be used for tunneling into the server for now. As I don't have access to that many IMAP servers, I haven't been able to test the new code with a wide variety of parameter combinations. I did test both secure and insecure (imaps:// and imap://) connections and values of "PLAIN" and "LOGIN" for the authMethod. In order to suppress a sparse warning about "using sizeof on a function", we use the same solution used in commit 9371322a6 ("sparse: suppress some "using sizeof on a function" warnings", 06-10-2013) which solved exactly this problem for the other commands using libcurl. Helped-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Bernhard Reiter <ockham@raz.or.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'br/imap-send-verbosity'Junio C Hamano2015-01-072-11/+31
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | * br/imap-send-verbosity: imap-send: use parse options API to determine verbosity
| * | | | | | imap-send: use parse options API to determine verbositybr/imap-send-verbosityBernhard Reiter2014-11-052-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -v/-q options were sort-of supported but without using the parse-options API, and were not documented. Signed-off-by: Bernhard Reiter <ockham@raz.or.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'nd/lockfile-absolute'Junio C Hamano2015-01-072-3/+26
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lockfile API can get confused which file to clean up when the process moved the $cwd after creating a lockfile. * nd/lockfile-absolute: lockfile.c: store absolute path
| * | | | | | | lockfile.c: store absolute pathnd/lockfile-absoluteNguyễn Thái Ngọc Duy2014-11-032-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Locked paths can be saved in a linked list so that if something wrong happens, *.lock are removed. For relative paths, this works fine if we keep cwd the same, which is true 99% of time except: - update-index and read-tree hold the lock on $GIT_DIR/index really early, then later on may call setup_work_tree() to move cwd. - Suppose a lock is being held (e.g. by "git add") then somewhere down the line, somebody calls real_path (e.g. "link_alt_odb_entry"), which temporarily moves cwd away and back. During that time when cwd is moved (either permanently or temporarily) and we decide to die(), attempts to remove relative *.lock will fail, and the next operation will complain that some files are still locked. Avoid this case by turning relative paths to absolute before storing the path in "filename" field. Reported-by: Yue Lin Ho <yuelinho777@gmail.com> Helped-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Adapted-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jc/merge-bases'Junio C Hamano2015-01-0711-22/+38
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The get_merge_bases*() API was easy to misuse by careless copy&paste coders, leaving object flags tainted in the commits that needed to be traversed. * jc/merge-bases: get_merge_bases(): always clean-up object flags bisect: clean flags after checking merge bases
| * | | | | | | | get_merge_bases(): always clean-up object flagsjc/merge-basesJunio C Hamano2014-10-3011-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callers of get_merge_bases() can choose to leave object flags used during the merge-base traversal by passing cleanup=0 as a parameter, but in practice a very few callers can afford to do so (namely, "git merge-base"), as they need to compute merge base in preparation for other processing of their own and they need to see the object without contaminate flags. Change the function signature of get_merge_bases_many() and get_merge_bases() to drop the cleanup parameter, so that the majority of the callers do not have to say ", 1" at the end. Give a new get_merge_bases_many_dirty() API to support only a few callers that know they do not need to spend cycles cleaning up the object flags. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | bisect: clean flags after checking merge basesJunio C Hamano2014-10-301-1/+1
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unless there is a good reason to belieave that a particular invocation of a get_merge_bases*() is the last one that cares about the object flags the computation of merge bases leaves on the objects, the "cleanup" parameter should always be true, and I do not think there is one in this codepath. Found by code inspection. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jc/strbuf-add-lines-avoid-sp-ht-sequence'Junio C Hamano2015-01-072-1/+8
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commented output used to blindly add a SP before the payload line, resulting in "# \t<indented text>\n" when the payload began with a HT. Instead, produce "#\t<indented text>\n". * jc/strbuf-add-lines-avoid-sp-ht-sequence: strbuf_add_commented_lines(): avoid SP-HT sequence in commented lines
| * | | | | | | | strbuf_add_commented_lines(): avoid SP-HT sequence in commented linesjc/strbuf-add-lines-avoid-sp-ht-sequenceJunio C Hamano2014-10-272-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strbuf_add_commented_lines() function passes a pair of prefixes, one to be used for a non-empty line, and the other for an empty line, to underlying add_lines(). The former is set to a comment char followed by a SP, while the latter is set to just the comment char. This is designed to give a SP after the comment character, e.g. "# <user text>\n", on a line with some text, and to avoid emitting an unsightly "# \n" for an empty line. Teach this machinery to also use the latter space-less prefix when the payload line begins with a tab, to show e.g. "#\t<user text>\n"; otherwise we will end up showing "# \t<user text>\n" which is similarly unsightly. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jc/diff-b-m'Junio C Hamano2015-01-073-3/+11
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix long-standing bug in "diff -B -M" output. * jc/diff-b-m: diff -B -M: fix output for "copy and then rewrite" case
| * | | | | | | | | diff -B -M: fix output for "copy and then rewrite" caseJunio C Hamano2014-10-233-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting from a single file, A, if you create B as a copy of A (and possibly make some edit) and then make extensive change to A, you will see: $ git diff -C --name-status C89 A B M A which is expected. However, if you ask the same question in a different way, you see this: $ git diff -B -M --name-status R89 A B M100 A telling us that A was rename-edited into B (as if "A will no longer exist as the result") and at the same time A itself was extensively edited. In this case, because the resulting tree still does have file A (even if it has contents vastly different from the original), we should use "C"opy, not "R"ename, to avoid hinting that A somehow goes away. Two existing tests were depending on the wrong behaviour, and fixed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'jc/clone-borrow'Junio C Hamano2015-01-073-2/+46
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow "git clone --reference" to be used more safely. * jc/clone-borrow: clone: --dissociate option to mark that reference is only temporary
| * | | | | | | | | | clone: --dissociate option to mark that reference is only temporaryjc/clone-borrowJunio C Hamano2014-10-153-2/+46
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While use of the --reference option to borrow objects from an existing local repository of the same project is an effective way to reduce traffic when cloning a project over the network, it makes the resulting "borrowing" repository dependent on the "borrowed" repository. After running git clone --reference=P $URL Q the resulting repository Q will be broken if the borrowed repository P disappears. The way to allow the borrowed repository to be removed is to repack the borrowing repository (i.e. run "git repack -a -d" in Q); while power users may know it very well, it is not easily discoverable. Teach a new "--dissociate" option to "git clone" to run this repacking for the user. Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'jc/checkout-local-track-report'Junio C Hamano2015-01-072-11/+41
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The report from "git checkout" on a branch that builds on another local branch by setting its branch.*.merge to branch name (not a full refname) incorrectly said that the upstream is gone. * jc/checkout-local-track-report: checkout: report upstream correctly even with loosely defined branch.*.merge
| * | | | | | | | | | checkout: report upstream correctly even with loosely defined branch.*.mergejc/checkout-local-track-reportJunio C Hamano2014-10-142-11/+41
| | |_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking out a branch that is set to build on top of another branch (often, a remote-tracking branch), "git checkout" reports how your work relates to the other branch, e.g. Your branch is behind 'origin/master', and can be fast-forwarded. Back when this feature was introduced, this was only done for branches that build on remote-tracking branches, but 5e6e2b48 (Make local branches behave like remote branches when --tracked, 2009-04-01) added support to give the same report for branches that build on other local branches (i.e. branches whose branch.*.remote variables are set to '.'). Unlike the support for the branches building on remote-tracking branches, however, this did not take into account the fact that branch.*.merge configuration is allowed to record a shortened branch name. When branch.*.merge is set to 'master' (not 'refs/heads/master'), i.e. "my branch builds on the local 'master' branch", this caused "git checkout" to report: Your branch is based on 'master', but the upstream is gone. The upstream is our repository and is definitely not gone, so this output is nonsense. The fix is fairly obvious; just like the branch name is DWIMed when "git pull" merges from the 'master' branch without complaint on such a branch, the name of the branch the current branch builds upon needs to be DWIMed the same way. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'for-junio' of git://bogomips.org/git-svnJunio C Hamano2014-12-293-1/+181
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-junio' of git://bogomips.org/git-svn: git-svn: support for git-svn propset
| * | | | | | | | | | git-svn: support for git-svn propsetAlfred Perlstein2014-12-093-1/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows git-svn to support setting subversion properties. It is useful for manually setting properties when committing to a subversion repo that *requires* properties to be set without requiring moving your changeset to separate subversion checkout in order to set props. This change is initially from David Fraser, appearing at: http://mid.gmane.org/1927112650.1281253084529659.JavaMail.root@klofta.sjsoft.com> They are now forward-ported to most recent git along with fixes to deal with files in subdirectories. Style and functional changes from Eric Wong have been taken in their entirety from: http://mid.gmane.org/20141201094911.GA13931@dcvr.yhbt.net There is a nit to point out: the code does not support adding props unless there are also content changes to the files as well. This is demonstrated in the testcase. [ew - simplify Git.pm usage for check-attr - improve shell portability for tests - minor phrasing changes in commit message] Signed-off-by: David Fraser <davidf@sjsoft.com> Signed-off-by: Alfred Perlstein <alfred@freebsd.org> Signed-off-by: Eric Wong <normalperson@yhbt.net>
* | | | | | | | | | | Merge branch 'jc/t9001-modernise'Junio C Hamano2014-12-291-294/+287
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/t9001-modernise: t9001: style modernisation phase #5 t9001: style modernisation phase #4 t9001: style modernisation phase #3 t9001: style modernisation phase #2 t9001: style modernisation phase #1
| * | | | | | | | | | | t9001: style modernisation phase #5jc/t9001-moderniseJunio C Hamano2014-11-251-76/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two general shell script codingstyles around here-text. - Quote the <<\END_OF_HERE_TEXT string when there is no parameter substitution going on to reduce cognitive load of the reader. - Indent the text with <<-\END_OF_HERE_TEXT when able to make it easier to spot boundaries of the tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | t9001: style modernisation phase #4Junio C Hamano2014-11-251-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two general shell script codingstyles. - No SP between redirection operator and its target - One SP on both sides of () in "name () {" that begins a shell function Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | t9001: style modernisation phase #3Junio C Hamano2014-11-251-52/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use write_script. The resulting patch makes it a lot easier to understand what the written script is doing. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | t9001: style modernisation phase #2Junio C Hamano2014-11-251-151/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Indent is done with HTs, not a run of SPs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | t9001: style modernisation phase #1Junio C Hamano2014-11-251-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't chop test_expect_success line into pieces and concatenate with '\'. That's so 2005. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'mh/update-ref-verify'Junio C Hamano2014-12-292-9/+97
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git update-ref --stdin"'s verify command did not work well when <oldvalue>, which is documented as optional, was missing. * mh/update-ref-verify: update-ref: fix "verify" command with missing <oldvalue> t1400: add some more tests of "update-ref --stdin"'s verify command
| * | | | | | | | | | | | update-ref: fix "verify" command with missing <oldvalue>mh/update-ref-verifyMichael Haggerty2014-12-112-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If "git update-ref --stdin" was given a "verify" command with no "<newvalue>" at all (not even zeros), the code was mistakenly setting have_old=0 (and leaving old_sha1 uninitialized). But this is incorrect: this command is supposed to verify that the reference doesn't exist. So in this case we really need old_sha1 to be set to null_sha1 and have_old to be set to 1. Moreover, since have_old was being set to zero, *no* check of the old value was being done, so the new value of the reference was being set unconditionally to the value in new_sha1. new_sha1, in turn, was set to null_sha1 in the expectation that that was the old value and it shouldn't be changed. But because the precondition was not being checked, the result was that the reference was being deleted unconditionally. So, if <oldvalue> is missing, set have_old unconditionally and set old_sha1 to null_sha1. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | t1400: add some more tests of "update-ref --stdin"'s verify commandMichael Haggerty2014-12-111-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two of the tests fail because verify refs/heads/foo with no argument (not even zeros) actually *deletes* refs/heads/foo. This problem will be fixed in the next commit. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | Sync with maintJunio C Hamano2014-12-222-1/+34
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | Prepare for 2.2.2Junio C Hamano2014-12-222-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | Merge branch 'jk/rebuild-perl-scripts-with-no-perl-seting-change' into maintJunio C Hamano2014-12-221-4/+10
| |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build procedure did not bother fixing perl and python scripts when NO_PERL and NO_PYTHON build-time configuration changed. * jk/rebuild-perl-scripts-with-no-perl-seting-change: Makefile: have python scripts depend on NO_PYTHON setting Makefile: simplify by using SCRIPT_{PERL,SH}_GEN macros Makefile: have perl scripts depend on NO_PERL setting
| * \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'jk/no-perl-tests' into maintJunio C Hamano2014-12-223-4/+4
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests that depend on perl lacked PERL prerequisite to protect them, breaking build with NO_PERL configuration. * jk/no-perl-tests: t960[34]: mark cvsimport tests as requiring perl t0090: mark add-interactive test with PERL prerequisite