summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* doc: fix minor typos (extra/duplicated words)ez/doc-duplicated-words-fixEvan Zacks2017-09-144-4/+4
| | | | | | | | Following are several fixes for duplicated words ("of of") and one case where an extra article ("a") slipped in. Signed-off-by: Evan Zacks <zackse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* RelNotes: further fixes for 2.14.2 from the master frontJunio C Hamano2017-09-101-0/+59
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jt/doc-pack-objects-fix' into maintJunio C Hamano2017-09-101-6/+11
|\ | | | | | | | | | | | | Doc updates. * jt/doc-pack-objects-fix: Doc: clarify that pack-objects makes packs, plural
| * Doc: clarify that pack-objects makes packs, pluraljt/doc-pack-objects-fixJonathan Tan2017-08-231-6/+11
| | | | | | | | | | | | | | | | | | | | The documentation for pack-objects describes that it creates "a packed archive of objects", which is confusing because it may create multiple packs if --max-pack-size is set. Update the documentation to clarify this, and explaining in which cases such a feature would be useful. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jn/vcs-svn-cleanup' into maintJunio C Hamano2017-09-106-86/+56
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * jn/vcs-svn-cleanup: vcs-svn: move remaining repo_tree functions to fast_export.h vcs-svn: remove repo_delete wrapper function vcs-svn: remove custom mode constants vcs-svn: remove more unused prototypes and declarations
| * | vcs-svn: move remaining repo_tree functions to fast_export.hjn/vcs-svn-cleanupJonathan Nieder2017-08-236-55/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These used to be for manipulating the in-memory repo_tree structure, but nowadays they are convenience wrappers to handle a few git-vs-svn mismatches: 1. Git does not track empty directories but Subversion does. When looking up a path in git that Subversion thinks exists and finding nothing, we can safely assume that the path represents a directory. This is needed when a later Subversion revision modifies that directory. 2. Subversion allows deleting a file by copying. In Git fast-import we have to handle that more explicitly as a deletion. These are details of the tool's interaction with git fast-import. Move them to fast_export.c, where other such details are handled. This way the function names do not start with a repo_ prefix that would clash with the repository object introduced in v2.14.0-rc0~38^2~16 (repository: introduce the repository object, 2017-06-22) or an svn_ prefix that would clash with libsvn (in case someone wants to link this code with libsvn some day). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | vcs-svn: remove repo_delete wrapper functionJonathan Nieder2017-08-233-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to fast-import, 2010-12-13) this is an alias for fast_export_delete. Remove the unnecessary layer of indirection. No functional change intended. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | vcs-svn: remove custom mode constantsJonathan Nieder2017-08-234-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the rest of Git, these modes are spelled as S_IFDIR, S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK. Use the same constants in svn-fe for simplicity and consistency. No functional change intended. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | vcs-svn: remove more unused prototypes and declarationsJonathan Nieder2017-08-231-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I forgot to remove these in v1.7.10-rc0~118^2~4^2~5^2~4 (vcs-svn: eliminate repo_tree structure, 2010-12-10). This finishes what was started in commit 36f63b50 (vcs-svn: remove unused prototypes, 2017-08-21). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'bc/vcs-svn-cleanup' into maintJunio C Hamano2017-09-103-17/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | Code clean-up. * bc/vcs-svn-cleanup: vcs-svn: rename repo functions to "svn_repo" vcs-svn: remove unused prototypes
| * | vcs-svn: rename repo functions to "svn_repo"bc/vcs-svn-cleanupbrian m. carlson2017-08-203-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several functions in the Subversion code that started with "repo_". This namespace is also used by the Git struct repository code. Rename these functions to start with "svn_repo" to avoid any future conflicts. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | vcs-svn: remove unused prototypesbrian m. carlson2017-08-201-7/+0
| |/ | | | | | | | | | | | | | | | | | | The Subversion code had prototypes for several functions which were not ever defined or used. These functions all had names starting with "repo_", some of which conflict with those in repository.h. To avoid the conflict, remove those unused prototypes. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jk/doc-the-this' into maintJunio C Hamano2017-09-101-2/+2
|\ \ | | | | | | | | | | | | | | | | | | Doc clean-up. * jk/doc-the-this: doc: fix typo in sendemail.identity
| * | doc: fix typo in sendemail.identityjk/doc-the-thisJeff King2017-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Saying "the this" is an obvious typo. But while we're here, let's polish the English on the second half of the sentence, too. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rs/commit-h-single-parent-cleanup' into maintJunio C Hamano2017-09-101-5/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * rs/commit-h-single-parent-cleanup: commit: remove unused inline function single_parent()
| * | | commit: remove unused inline function single_parent()rs/commit-h-single-parent-cleanupRené Scharfe2017-08-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 53b2c823f6 (revision walker: mini clean-up) added the function in 2007, but it was never used, so we should be able to get rid of it now. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'mg/format-ref-doc-fix' into maintJunio C Hamano2017-09-103-8/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc fix. * mg/format-ref-doc-fix: Documentation/git-for-each-ref: clarify peeling of tags for --format Documentation: use proper wording for ref format strings
| * | | | Documentation/git-for-each-ref: clarify peeling of tags for --formatmg/format-ref-doc-fixMichael J Gruber2017-08-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `*` in format strings means peeling of tag objects so that object field names refer to the object that the tag object points at, instead of the tag object itself. Currently, this is documented using grammar that is clearly inspired by classical latin, though missing more than an article in order to be classical english. Try and straighten that explanation out a bit. Signed-off-by: Michael J Gruber <git@grubix.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Documentation: use proper wording for ref format stringsMichael J Gruber2017-08-183-6/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various commands list refs and allow to use a format string for the output that interpolates from the ref as well as the object it points at (for-each-ref; branch and tag in list mode). Currently, the documentation talks about interpolating from the object. This is confusing because a ref points to an object but not vice versa, so the object cannot possible know %(refname), for example. Thus, this is wrong independent of refs being objects (one day, maybe) or not. Change the wording to make this clearer (and distinguish it from formats for the log family). Signed-off-by: Michael J Gruber <git@grubix.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'sb/submodule-parallel-update' into maintJunio C Hamano2017-09-101-1/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * sb/submodule-parallel-update: submodule.sh: remove unused variable
| * | | | submodule.sh: remove unused variablesb/submodule-parallel-updateStefan Beller2017-08-171-1/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This could have been part of 48308681b0 (git submodule update: have a dedicated helper for cloning, 2016-02-29). Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'hv/t5526-andand-chain-fix' into maintJunio C Hamano2017-09-101-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test fix. * hv/t5526-andand-chain-fix: t5526: fix some broken && chains
| * | | | t5526: fix some broken && chainshv/t5526-andand-chain-fixHeiko Voigt2017-08-171-4/+4
| |/ / / | | | | | | | | | | | | | | | | Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'sb/sha1-file-cleanup' into maintJunio C Hamano2017-09-102-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * sb/sha1-file-cleanup: sha1_file: make read_info_alternates static
| * | | | sha1_file: make read_info_alternates staticsb/sha1-file-cleanupStefan Beller2017-08-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_info_alternates is not used from outside, so let's make it static. We have to declare the function before link_alt_odb_entry instead of moving the code around, link_alt_odb_entry calls read_info_alternates, which in turn calls link_alt_odb_entry. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'rs/t1002-do-not-use-sum' into maintJunio C Hamano2017-09-102-35/+35
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test simplification. * rs/t1002-do-not-use-sum: t1002: stop using sum(1)
| * | | | | t1002: stop using sum(1)rs/t1002-do-not-use-sumRené Scharfe2017-08-152-35/+35
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sum(1) is a command for calculating checksums of the contents of files. It was part of early editions of Unix ("Research Unix", 1972/1973, [1]). cksum(1) appeared in 4.4BSD (1993) as a replacement [2], and became part of POSIX.1-2008 [3]. OpenBSD 5.6 (2014) removed sum(1). We only use sum(1) in t1002 to check for changes in three files. On MinGW we use md5sum(1) instead. We could switch to the standard command cksum(1) for all platforms; MinGW comes with GNU coreutils now, which provides sum(1), cksum(1) and md5sum(1). Use our standard method for checking for file changes instead: test_cmp. It's more convenient because it shows differences nicely, it's faster on MinGW because we have a special implementation there based only on shell-internal commands, it's simpler as it allows us to avoid stripping out unnecessary entries from the checksum file using grep(1), and it's more consistent with the rest of the test suite. We already compare changed files with their expected new contents using diff(1), so we don't need to check with "test_must_fail test_cmp" if they differ from their original state. A later patch could convert the direct diff(1) calls to test_cmp as well. With all sum(1) calls gone, remove the MinGW-specific implementation from test-lib.sh as well. [1] http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/sum.1 [2] http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.4BSD/usr/share/man/cat1/cksum.0 [3] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cksum.html Signed-off-by: René Scharfe <l.s.r@web.de> Reviewed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ah/doc-empty-string-is-false' into maintJunio C Hamano2017-09-102-6/+7
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc update. * ah/doc-empty-string-is-false: doc: clarify "config --bool" behaviour with empty string
| * | | | | doc: clarify "config --bool" behaviour with empty stringah/doc-empty-string-is-falseAndreas Heiduk2017-08-142-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `git config --bool xxx.yyy` returns `true` for `[xxx]yyy` but `false` for `[xxx]yyy=` or `[xxx]yyy=""`. This is tested in t1300-repo-config.sh since 09bc098c2. Signed-off-by: Andreas Heiduk <asheiduk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'rs/merge-microcleanup' into maintJunio C Hamano2017-09-101-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * rs/merge-microcleanup: merge: use skip_prefix()
| * | | | | | merge: use skip_prefix()rs/merge-microcleanupRené Scharfe2017-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of a magic string length constant by using skip_prefix() instead of starts_with(). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'rs/find-pack-entry-bisection' into maintJunio C Hamano2017-09-101-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * rs/find-pack-entry-bisection: sha1_file: avoid comparison if no packed hash matches the first byte
| * | | | | | | sha1_file: avoid comparison if no packed hash matches the first byters/find-pack-entry-bisectionRené Scharfe2017-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_pack_entry_one() uses the fan-out table of pack indexes to find out which entries match the first byte of the searched hash and does a binary search on this subset of the main index table. If there are no matching entries then lo and hi will have the same value. The binary search still starts and compares the hash of the following entry (which has a non-matching first byte, so won't cause any trouble), or whatever comes after the sorted list of entries. The probability of that stray comparison matching by mistake is low, but let's not take any chances and check when entering the binary search loop if we're actually done already. Signed-off-by: Rene Scharfe <l.s.r@web.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'rs/apply-lose-prefix-length' into maintJunio C Hamano2017-09-102-8/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * rs/apply-lose-prefix-length: apply: remove prefix_length member from apply_state
| * | | | | | | | apply: remove prefix_length member from apply_staters/apply-lose-prefix-lengthRené Scharfe2017-08-092-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a NULL-and-NUL check to see if we have a prefix and consistently use C string functions on it instead of storing its length in a member of struct apply_state. This avoids strlen() calls and simplifies the code. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'rj/add-chmod-error-message' into maintJunio C Hamano2017-09-101-3/+3
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Message fix. * rj/add-chmod-error-message: builtin/add: add detail to a 'cannot chmod' error message
| * | | | | | | | | builtin/add: add detail to a 'cannot chmod' error messagerj/add-chmod-error-messageRamsay Jones2017-08-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to adding the missing newline, add the x-ecutable bit 'mode change' character to the error message. This message now has the same form as similar messages output by 'update-index'. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'jk/hashcmp-memcmp' into maintJunio C Hamano2017-09-101-8/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * jk/hashcmp-memcmp: hashcmp: use memcmp instead of open-coded loop
| * | | | | | | | | | hashcmp: use memcmp instead of open-coded loopjk/hashcmp-memcmpJeff King2017-08-091-8/+1
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 1a812f3a70 (hashcmp(): inline memcmp() by hand to optimize, 2011-04-28), it was reported that an open-coded loop outperformed memcmp() for comparing sha1s. Discussion[1] a few years later in 2013 showed that this depends on your libc's version of memcmp(). In particular, glibc 2.13 optimized their memcmp around 2011. Here are current timings with glibc 2.24 (best-of-five, on linux.git): [before this patch, open-coded] $ time git rev-list --objects --all real 0m35.357s user 0m35.016s sys 0m0.340s [after this patch, memcmp] real 0m32.930s user 0m32.630s sys 0m0.300s Now that we've had 6 years for that version of glibc to make its way onto people's machines, it's worth revisiting our benchmarks and switching to memcmp(). It may be that there are other non-glibc systems where memcmp() isn't as well optimized. But since our single data point in favor of open-coding was on a now-ancient glibc, we should probably assume the system memcmp is good unless proven otherwise. We may end up with a SLOW_MEMCMP Makefile knob, but we can hold off on that until we actually find such a system in practice. [1] https://public-inbox.org/git/20130318073229.GA5551@sigill.intra.peff.net/ Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'rs/t3700-clean-leftover' into maintJunio C Hamano2017-09-101-0/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A test fix. * rs/t3700-clean-leftover: t3700: fix broken test under !POSIXPERM
| * | | | | | | | | | t3700: fix broken test under !POSIXPERMrs/t3700-clean-leftoverRené Scharfe2017-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 76e368c378 (t3700: fix broken test under !SANITY) explains that the test 'git add --chmod=[+-]x changes index with already added file' can fail if xfoo3 is still present as a symlink from a previous test and deletes it with rm(1). That still leaves it present in the index, which causes the test to fail if POSIXPERM is not defined. Get rid of it by calling "git reset --hard" as well, as 76e368c378 already mentioned in passing. Helped-by: Adam Dinwoodie <adam@dinwoodie.org> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'jc/perl-git-comment-typofix' into maintJunio C Hamano2017-09-101-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A comment fix. * jc/perl-git-comment-typofix: perl/Git.pm: typofix in a comment
| * | | | | | | | | | | perl/Git.pm: typofix in a commentjc/perl-git-comment-typofixJunio C Hamano2017-08-071-1/+1
| | |_|_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No change of behaviour intended. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'mf/no-dashed-subcommands' into maintJunio C Hamano2017-09-105-10/+10
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code clean-up. * mf/no-dashed-subcommands: scripts: use "git foo" not "git-foo"
| * | | | | | | | | | | scripts: use "git foo" not "git-foo"mf/no-dashed-subcommandsMichael Forney2017-08-075-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to make sure that people who copy & paste code would see fewer instances of "git-foo". The use of these dashed forms have been discouraged since v1.6.0 days. Signed-off-by: Michael Forney <mforney@mforney.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'ab/ref-filter-no-contains' into maintJunio C Hamano2017-09-101-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A test fix. * ab/ref-filter-no-contains: tests: don't give unportable ">" to "test" built-in, use -gt
| * | | | | | | | | | | | tests: don't give unportable ">" to "test" built-in, use -gtab/ref-filter-no-containsÆvar Arnfjörð Bjarmason2017-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change an argument to test_line_count (which'll ultimately be turned into a "test" expression) to use "-gt" instead of ">" for an arithmetic test. This broken on e.g. OpenBSD as of v2.13.0 with my commit ac3f5a3468 ("ref-filter: add --no-contains option to tag/branch/for-each-ref", 2017-03-24). Downstream just worked around it by patching git and didn't tell us about it, I discovered this when reading various Git packaging implementations: https://github.com/openbsd/ports/commit/7e48bf88a20 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | Merge branch 'rs/archive-excluded-directory' into maintJunio C Hamano2017-09-102-11/+85
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git archive" did not work well with pathspecs and the export-ignore attribute. We may want to resurrect the "we don't archive an empty directory" bonus patch, but I do not mind merging the above early to 'next' and leave it as a separate follow-up enhancement. cf. <20170820090629.tumvqwzkromcykjf@sigill.intra.peff.net> * rs/archive-excluded-directory: archive: don't queue excluded directories archive: factor out helper functions for handling attributes t5001: add tests for export-ignore attributes and exclude pathspecs
| * | | | | | | | | | | | | archive: don't queue excluded directoriesRené Scharfe2017-08-192-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reject directories with the attribute export-ignore already while queuing them. This prevents read_tree_recursive() from descending into them and this avoids write_archive_entry() rejecting them later on, which queue_or_write_archive_entry() is not prepared for. Borrow the existing strbuf to build the full path to avoid string copies and extra allocations; just make sure we restore the original value before moving on. Keep checking any other attributes in write_archive_entry() as before, but avoid checking them twice. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | | | | archive: factor out helper functions for handling attributesRené Scharfe2017-08-191-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helpers for accessing attributes that encapsulate the details of how to retrieve their values. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>