summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-09Makefile: split GIT_USER_AGENT from GIT-CFLAGSLibravatar Jeff King2-2/+10
The default user-agent depends on the GIT_VERSION, which means that anytime you switch versions, it causes a full rebuild. Instead, let's split it out into its own file and restrict the dependency to version.o. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09Makefile: do not replace @@GIT_USER_AGENT@@ in scriptsLibravatar Jeff King1-1/+0
No scripts actually care about this replacement. This was erroneously added by 42dcbb7 (version: add git_user_agent function, 2012-06-02). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09Makefile: apply dependencies consistently to sparse/asm targetsLibravatar Jeff King1-2/+2
When a C file "foo.c" depends on a generated header file, we note the dependency for the "foo.o" target. However, we should also note it for other targets that are built from foo.c, like "foo.sp" and "foo.s". These tend to be missed because the latter two are not part of the default build, and are typically built after a regular build which will generate the header. Let's be consistent about including them in dependencies. This also makes us more consistent with nearby lines which tack on EXTRA_CPPFLAGS when building certain files. These flags may sometimes require extra dependencies to be added (e.g., like GIT-VERSION-FILE; this is not the case for any of the updated lines in this patch, but it is establishing a style that will be used in later patches). Technically the ".sp" and ".s" targets do not care about these dependencies, because they are force-built (".sp" because it is a phony target, and ".s" because we explicitly force a rebuild). Since the blocks in question are about communicating "things built from foo.c depend on these flags", it frees the reader from having to know or care more about how those targets are implemented, and why it is OK for only "foo.o" to depend on GIT-VERSION-FILE while "foo.sp" and "foo.s" both are impacted by $(GIT_VERSION). And it helps future-proof us if those force-build details should ever change. This patch explicitly does not update the static header dependencies used when COMPUTED_HEADER_DEPENDENCIES is off. They are similar to the GIT-VERSION-FILE case above, in that technically "foo.s" would depend on its included headers, but it is irrelevant because we force-build it anyway. So it would be tempting to update them in the same way (for readability and future-proofing). However, those rules are meant as a fallback to the computed header dependencies, which do not handle ".s" and ".sp" at all (and are a much harder problem to solve, as gcc is the one generating those dependency lists). So let's leave that harder problem until (and if) somebody wants to change the ".sp" and ".s" rules, and keep the static header dependencies consistent with the computed ones. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09Makefile: do not have git.o depend on common-cmds.hLibravatar Jeff King1-1/+0
This dependency has been stale since 70827b1 (Split up builtin commands into separate files from git.c, 2006-04-21). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09Makefile: fold XDIFF_H and VCSSVN_H into LIB_HLibravatar Jonathan Nieder1-37/+25
Just like MISC_H (see previous commit), there is no reason to track xdiff and vcs-svn headers separately from the rest of the headers. The only purpose of these variables is to keep track of recompilation dependencies. As a pleasant side effect, folding these into LIB_H lets us stop tracking GIT_OBJS and VCSSVN_TEST_OBJS separately from the list of all OBJECTS. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-20Makefile: fold MISC_H into LIB_HLibravatar Jeff King1-29/+16
We keep a list of most of the header files in LIB_H, but some are split out into MISC_H. The original point of LIB_H was that it would force recompilation of C files when any of the library headers changed. It was over-encompassing, since not all C files included all of the library headers; this made it simple to maintain, but meant that we sometimes recompiled when it was not necessary. Over time, some new headers were omitted from LIB_H, and rules were added to the Makefile for a few specific targets to explicitly depend on them. This avoided some unnecessary recompilation at the cost of having to maintain the dependency list of those targets manually (e.g., d349a03). Later, we needed a complete list of headers from which we should extract strings to localized. Thus 1b8b2e4 introduced MISC_H to mention all header files not included in LIB_H, and the concatenation of the two lists is fed to xgettext. Headers mentioned as dependencies must also be manually added to MISC_H to receive the benefits of localization. Having to update multiple locations manually is a pain and has led to errors. For example, see "git log -Swt-status.h Makefile" for some back-and-forth between the two locations. Or the fact that column.h was never added to MISC_H, and therefore was not localized (which is fixed by this patch). Moreover, the benefits of keeping these few headers out of LIB_H is not that great, for two reasons: 1. The better way to do this is by auto-computing the dependencies, which is more accurate and less work to maintain. If your compiler supports it, we turn on computed header dependencies by default these days. So these manual dependencies are used only for people who do not have gcc at all (which increases the chance of them becoming stale, as many developers will never even use them). 2. Even if you do not have gcc, the manual header dependencies do not help all that much. They obviously cannot help with an initial compilation (since their purpose is to avoid unnecessary recompilation when a header changes), which means they are only useful when building a new version of git in the working tree that held an existing build (e.g., after checkout or during a bisection). But since a change of a header in LIB_H will force recompilation, and given that the vast majority of headers are in LIB_H, most version changes will result in a full rebuild anyway. Let's just fold MISC_H into LIB_H and get rid of these manual rules. The worst case is some extra compilation, but even that is unlikely to matter due to the reasons above. The one exception is that we should keep common-cmds.h separate. Because it is generated, the computed dependencies do not handle it properly, and we must keep separate individual dependencies on it. Let's therefore rename MISC_H to GENERATED_H to make it more clear what should go in it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-20Makefile: sort LIB_H listLibravatar Jeff King1-4/+4
This was mostly sorted already, but put things like "cache-tree.h" after "cache.h", even though "-" comes before "." (at least in the C locale). This will make it easier to keep the list sorted later by piping it through "sort". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-03http: get default user-agent from git_user_agentLibravatar Jeff King2-5/+3
This means we will respect the GIT_USER_AGENT build-time configuration and run-time environment variable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-03version: add git_user_agent functionLibravatar Jeff King3-0/+26
This is basically a fancy way of saying "git/$GIT_VERSION", except that it is overridable at build-time and through the environment. Which means that people who don't want to advertise their git version (for privacy or security reasons) can tweak it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-03move git_version_string into version.cLibravatar Jeff King7-5/+18
The global git_version_string currently lives in git.c, but doesn't have anything to do with the git wrapper. Let's move it into its own file, where it will be more appropriate to build more version-related functions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-01Update draft release notes to 1.7.11Libravatar Junio C Hamano1-18/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-01Merge branch 'ef/maint-rebase-error-message'Libravatar Junio C Hamano2-1/+6
By Erik Faye-Lund * ef/maint-rebase-error-message: rebase: report invalid commit correctly
2012-06-01Merge branch 'nh/empty-rebase'Libravatar Junio C Hamano2-28/+75
* nh/empty-rebase: cherry-pick: regression fix for empty commits
2012-06-01Merge branch 'vr/rebase-autosquash-does-not-imply-i'Libravatar Junio C Hamano1-0/+1
"git rebase -p" used to pay attention to rebase.autosquash which was wrong. "git rebase -p -i" should, but "git rebase -p" by itself should not. By Vincent van Ravesteijn * vr/rebase-autosquash-does-not-imply-i: Do not autosquash in case of an implied interactive rebase
2012-06-01Merge branch 'mm/levenstein-penalize-deletion-less'Libravatar Junio C Hamano1-1/+1
"git tags" used to suggest "git stage" which was nonsense; it should have favored "git tag". Tweak the cost of deletion to correct it. By Matthieu Moy * mm/levenstein-penalize-deletion-less: Reduce cost of deletion in levenstein distance (4 -> 3)
2012-06-01Merge branch 'jl/submodule-report-new-path-once'Libravatar Junio C Hamano1-3/+4
"git submodule init" used to report "registered for path ..." even for submodules that were registered earlier. By Jens Lehmann * jl/submodule-report-new-path-once: submodules: print "registered for path" message only once
2012-06-01Sync with maintLibravatar Junio C Hamano3-2/+28
2012-06-01Start preparing for 1.7.10.4Libravatar Junio C Hamano3-2/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-01Merge branch 'ef/http-o-depends-on-gvf' into maintLibravatar Junio C Hamano1-1/+1
A minor compilation fix. By Erik Faye-Lund * ef/http-o-depends-on-gvf: Makefile: add missing GIT-VERSION-FILE dependency
2012-06-01Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano6-634/+12887
By Jiang Xin (4) and others via Jiang Xin * git://github.com/git-l10n/git-po: l10n: Set nplurals of zh_CN.po from 1 to 2 l10n: zh_CN.po: translate 323 new messages l10n: zh.CN.po: update by msgmerge git.pot First release translation for Vietnamese Init translation for Vietnamese l10n: New it.po file with 504 translations Update Swedish translation (728t0f0u) l10n: Update git.pot (41 new messages)
2012-06-01Merge branch 'rs/maint-grep-F' into maintLibravatar Junio C Hamano5-24/+68
"git grep -e '$pattern'", unlike the case where the patterns are read from a file, did not treat individual lines in the given pattern argument as separate regular expressions as it should. By René Scharfe * rs/maint-grep-F: grep: stop leaking line strings with -f grep: support newline separated pattern list grep: factor out do_append_grep_pat() grep: factor out create_grep_pat()
2012-06-01Merge branch 'jk/ident-split-fix' into maintLibravatar Junio C Hamano2-1/+8
An author/committer name that is a single character was mishandled as an invalid name by mistake. By Jeff King * jk/ident-split-fix: fix off-by-one error in split_ident_line
2012-06-01Merge branch 'jk/pretty-commit-header-incomplete-line' into maintLibravatar Junio C Hamano1-1/+4
By Jeff King * jk/pretty-commit-header-incomplete-line: avoid segfault when reading header of malformed commits
2012-06-01Merge branch 'jk/format-person-part-buffer-limit' into maintLibravatar Junio C Hamano1-2/+4
By Jeff King * jk/format-person-part-buffer-limit: pretty: avoid buffer overflow in format_person_part
2012-06-01Merge branch 'ap/checkout-no-progress-for-non-tty' into maintLibravatar Junio C Hamano1-2/+2
"git checkout" gave progress display even when the standard error stream was not connected to the tty, which made little sense. By Avery Pennarun * ap/checkout-no-progress-for-non-tty: checkout: no progress messages if !isatty(2).
2012-06-01Merge branch 'maint' of git://github.com/git-l10n/git-po into maintLibravatar Junio C Hamano1-247/+289
By Peter Krefting via Peter Krefting * 'maint' of git://github.com/git-l10n/git-po: Update Swedish translation (728t0f0u)
2012-06-01i18n: apply: split to fix a partial i18n messageLibravatar Jiang Xin1-4/+12
The 4th arg of "new mode (%o) of %s does not match old mode (%o)%s%s" is blank string or string " of ". Even mark the string " of " for a complete i18n, this message is still hard to translate right. Split it into two slight different messages would make l10n teams happy. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-01l10n: Set nplurals of zh_CN.po from 1 to 2Libravatar Jiang Xin1-10/+42
In most cases, plural-forms are unnecessary for Chinese. For example, "apple" and "apples" are the same in Chinese, they are both translated as "苹果". While there are exceptions, e.g., the plural form of "he", "she" and "it" is "they" in English. In Chinese, "他(he)", "她(she)", and "它(it)" have plural forms too, they are "他们", "她们", and "它们". But what makes 'nplurals=1' hard to work right for Chinese is: #: bundle.c:192 #, c-format msgid "The bundle requires this ref" msgid_plural "The bundle requires these %d refs" Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-06-01l10n: zh_CN.po: translate 323 new messagesLibravatar Jiang Xin1-473/+447
Update Simplified Chinese translation for 134 fuzzy, 189 new messages from Git v1.7.10.2-548-g9de96. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Zhuang Ya <zhuangya@me.com>
2012-05-31Makefile: add missing GIT-VERSION-FILE dependencyLibravatar Erik Faye-Lund1-1/+1
In 20fc9bc (Set HTTP user agent to git/GIT_VERSION, 2006-04-04), http.o started recording GIT_VERSION, but http.o wasn't added to the list of files that depends on GIT-VERSION-FILE. Fix this, so mofications to GIT-VERSION-FILE will result in an updated user-agent string. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-31l10n: zh.CN.po: update by msgmerge git.potLibravatar Jiang Xin1-363/+1887
Update of zh_CN.po: 134 fuzzy translations, 189 untranslated messages. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-31First release translation for VietnameseLibravatar Tran Ngoc Quan1-1818/+2006
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2012-05-31Init translation for VietnameseLibravatar Tran Ngoc Quan2-0/+5176
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-30rebase: report invalid commit correctlyLibravatar Erik Faye-Lund2-1/+6
In 9765b6a (rebase: align variable content, 2011-02-06), the code to error out was moved up one level. Unfortunately, one reference to a function parameter wasn't rewritten as it should, leading to the wrong parameter being errored on. This error was propagated by 71786f5 (rebase: factor out reference parsing, 2011-02-06) and merged in 78c6e0f (Merge branch 'mz/rebase', 2011-04-28). Correct this by reporting $onto_name istead. Reported-By: Manuela Hutter <manuelah@opera.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-30INSTALL: update asciidoc recommendationLibravatar Jeff King1-4/+2
Since commit 6cf378f (docs: stop using asciidoc no-inline-literal), we no longer support asciidoc versions less than 8.4.1, which introduced inline literals. Note this in the INSTALL document. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-30l10n: New it.po file with 504 translationsLibravatar Marco Paolone2-0/+5148
Signed-off-by: Marco Paolone <marcopaolone@gmail.com>
2012-05-29cherry-pick: regression fix for empty commitsLibravatar Junio C Hamano2-28/+75
The earlier "--keep-redundant-commit" series broke "cherry-pick" that is given a commit whose change is already in the current history. Such a cherry-pick would result in an empty change, and should stop with an error, telling the user that conflict resolution may have made the result empty (which is exactly what is happening), but we silently dropped the change on the floor without any message nor non-zero exit code. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-29submodules: print "registered for path" message only onceLibravatar Jens Lehmann1-3/+4
Since 2cd9de3e (submodule add: always initialize .git/config entry) the message "Submodule '\$name' (\$url) registered for path '\$sm_path'" is printed every time cmd_init() is called, e.g. each time "git submodule update" is used with the --init option. This was not intended and leads to bogus output which can confuse users and build systems. Apart from that the $url variable was not set after the first run which did the actual initialization and only "()" was printed in subsequent runs where "($url)" was meant to inform the user about the upstream repo. Fix that by moving the say command in question into the if block where the url is initialized, restoring the behavior that was in place before the 2cd9de3e commit. While at it also remove the comment which still describes the logic used before 2cd9de3e and add a comment about how things work now. Reported-by: Nicolas Viennot and Sid Nair <nicolas@viennot.com> Reported-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-29Merge git://bogomips.org/git-svnLibravatar Junio C Hamano4-671/+831
By Jonathan Nieder via Eric Wong * git://bogomips.org/git-svn: git-svn: make Git::SVN::Fetcher a separate file git-svn: rename SVN::Git::* packages to Git::SVN::* git-svn: move Git::SVN::Prompt into its own file
2012-05-29t5701: modernize styleLibravatar Jeff King1-53/+20
This test is pretty old and did not follow some of our more modern best practices. In particular: 1. It chdir'd all over the place, leaving later tests to deal with the fallout. Do our chdirs in subshells instead. 2. It did not use test_must_fail. 3. It did not use test_line_count. 4. It checked for the non-existence of a ref by looking in the .git/refs directory (since we pack refs during clone these days, this will always be succeed, making the test useless). Note that one call to "-e .git/refs/..." remains, because it is checking for the existence of a symbolic ref, not a ref itself. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-29Merge branch 'va/git-p4-test'Libravatar Junio C Hamano1-3/+107
By Vitor Antunes * va/git-p4-test: git-p4: Clean up branch test cases git-p4: Verify detection of "empty" branch creation git-p4: Test changelists touching two branches
2012-05-29Merge branch 'jk/ident-gecos-strbuf'Libravatar Junio C Hamano19-238/+176
Fixes quite a lot of brokenness when ident information needs to be taken from the system and cleans up the code. By Jeff King * jk/ident-gecos-strbuf: (22 commits) format-patch: do not use bogus email addresses in message ids ident: reject bogus email addresses with IDENT_STRICT ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT format-patch: use GIT_COMMITTER_EMAIL in message ids ident: let callers omit name with fmt_indent ident: refactor NO_DATE flag in fmt_ident ident: reword empty ident error message format-patch: refactor get_patch_filename ident: trim whitespace from default name/email ident: use a dynamic strbuf in fmt_ident ident: use full dns names to generate email addresses ident: report passwd errors with a more friendly message drop length limitations on gecos-derived names and emails ident: don't write fallback username into git_default_name fmt_ident: drop IDENT_WARN_ON_NO_NAME code format-patch: use default email for generating message ids ident: trim trailing newline from /etc/mailname move git_default_* variables to ident.c move identity config parsing to ident.c fmt-merge-msg: don't use static buffer in record_person ...
2012-05-29Merge branch 'jk/fetch-pack-remove-dups-optim'Libravatar Junio C Hamano3-22/+54
The way "fetch-pack" that is given multiple references to fetch tried to remove duplicates was very inefficient. By Jeff King * jk/fetch-pack-remove-dups-optim: fetch-pack: sort incoming heads list earlier fetch-pack: avoid quadratic loop in filter_refs fetch-pack: sort the list of incoming refs add sorting infrastructure for list refs fetch-pack: avoid quadratic behavior in remove_duplicates fetch-pack: sort incoming heads
2012-05-29Merge branch 'rs/refs-string-slice'Libravatar Junio C Hamano1-29/+41
Avoid unnecessary temporary allocations while looking for matching refs inside refs API. By René Scharfe (3) and Junio C Hamano (1) * rs/refs-string-slice: refs: do not create ref_entry when searching refs: use strings directly in find_containing_dir() refs: convert parameter of create_dir_entry() to length-limited string refs: convert parameter of search_ref_dir() to length-limited string
2012-05-29Merge branch 'mh/fetch-pack-constness'Libravatar Junio C Hamano1-74/+71
Tighten constness of some local variables in a callchain. By Michael Haggerty * mh/fetch-pack-constness: cmd_fetch_pack(): respect constness of argv parameter cmd_fetch_pack(): combine the loop termination conditions cmd_fetch_pack(): handle non-option arguments outside of the loop cmd_fetch_pack(): declare dest to be const
2012-05-29Merge branch 'mh/ref-api-lazy-loose'Libravatar Junio C Hamano1-2/+7
The code to lazily read loose refs unnecessarily read the refs in a subhierarchy by mistake when we free the data for the subhierarchy. By Michael Haggerty * mh/ref-api-lazy-loose: free_ref_entry(): do not trigger reading of loose refs
2012-05-29Merge branch 'ng/pack-objects-cleanup'Libravatar Junio C Hamano2-152/+174
By Nguyễn Thái Ngọc Duy * ng/pack-objects-cleanup: pack-objects: refactor write_object() into helper functions pack-objects, streaming: turn "xx >= big_file_threshold" to ".. > .."
2012-05-29Do not autosquash in case of an implied interactive rebaseLibravatar Vincent van Ravesteijn1-0/+1
The option to autosquash is only used in case of an interactive rebase. When merges are preserved, rebase uses an interactive rebase internally, but in this case autosquash should still be disabled. Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-29Reduce cost of deletion in levenstein distance (4 -> 3)Libravatar Matthieu Moy1-1/+1
Before this patch, a character deletion has the same cost as 2 swaps, or 4 additions, so Git prefers suggesting a completely scrambled command name to removing a character. For example, "git tags" suggests "stage", but not "tag". By setting the deletion cost to 3, we keep it higher than swaps or additions, but prefer 1 deletion to 2 swaps. "git tags" now suggests "tag" in addition to staged. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-29git-p4: Clean up branch test casesLibravatar Vitor Antunes1-3/+1
Correct submit description in one test and remove not required commands from another. Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>