summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* remote: fix set-branches usagejc/remote-setbranches-usage-fixJunio C Hamano2011-11-061-1/+1
| | | | | | | | | Bad copy-paste. Otherwise "git remote set-branches" without necessary argument will result in an error message and help for set-url subcommand. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add git remote set-branchesJonathan Nieder2010-05-193-11/+192
| | | | | | | | | | | | | | | | Add ‘git remote set-branches’ for changing the list of tracked refs for a remote repository with one "porcelain-level" command. This complements the longstanding ‘git remote add --track’ option. The interface is based on the ‘git remote set-url’ subcommand. git remote set-branches base --add C git remote set-branches base A B D git remote set-branches base --delete D; # not implemented Suggested-by: martin f. krafft <madduck@debian.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2010-05-184-6/+8
|\ | | | | | | | | | | | | | | * maint: Documentation/gitdiffcore: fix order in pickaxe description Documentation: fix minor inconsistency Documentation: rebase -i ignores options passed to "git am" hash_object: correction for zero length file
| * Documentation/gitdiffcore: fix order in pickaxe descriptionMichael J Gruber2010-05-181-2/+2
| | | | | | | | | | | | | | | | Reverse the order of "origin" and "result" so that the sentence really describes an addition rather than a removal. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation: fix minor inconsistencyMichael J Gruber2010-05-181-1/+1
| | | | | | | | | | | | | | | | While we don't always write out commands in full (`git command`) we should do it consistently in adjacent paragraphs. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation: rebase -i ignores options passed to "git am"Markus Heidelberg2010-05-181-0/+1
| | | | | | | | | | Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * hash_object: correction for zero length fileDmitry Potapov2010-05-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | The check whether size is zero was done after if size <= SMALL_FILE_SIZE, as result, zero size case was never triggered. Instead zero length file was treated as any other small file. This did not caused any problem, but if we have a special case for size equal to zero, it is better to make it work and avoid redundant malloc(). Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff-options: make --patch a synonym for -pWill Palmer2010-05-182-1/+2
| | | | | | | | | | | | | | | | | | Here we simply make --patch a synonym for -p, whose mnemonic was "patch" all along. Signed-off-by: Will Palmer <wmpalmer@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | for-each-ref: Field with abbreviated objectnameMichael J Gruber2010-05-183-0/+13
| | | | | | | | | | | | | | | | | | Introduce a :short modifier to objectname which outputs the abbreviated object name. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | gitweb: Use @diff_opts while using format-patchPavan Kumar Sunkara2010-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | Make git-format-patch (used by 'patch' and 'patches' views) use the same rename detection options that git-diff and git-diff-tree (used by 'commitdiff', 'blobdiff', etc.) use. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2010-05-111-1/+1
|\ \ | |/ | | | | | | * maint: GIT-VERSION-GEN: restrict tags used
| * GIT-VERSION-GEN: restrict tags usedTay Ray Chuan2010-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Restrict the tags used to generate the version string to those that begin with "v", since git's tags for git-core (ie. excluding git-gui) are all of the form "vX.Y...". This is to avoid using private tags by the user in a clone of the git code repository, which may break certain machinery (eg. Makefile, gitk). Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2010-05-102-1/+15
|\ \ | |/ | | | | | | * maint: handle "git --bare init <dir>" properly
| * handle "git --bare init <dir>" properlyJeff King2010-05-102-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we know we are creating a bare repository, we use setenv to set the GIT_DIR directory to the current directory (either where we already were, or one we created and chdir'd into with "git init --bare <dir>"). However, with "git --bare init <dir>" (note the --bare as a git wrapper option), the setup code actually sets GIT_DIR for us, but it uses the wrong, original cwd when a directory is given. Because our setenv does not use the overwrite flag, it is ignored. We need to set the overwrite flag, but only when we are given a directory on the command line. That still allows: GIT_DIR=foo.git git init --bare to work. The behavior is changed for: GIT_DIR=foo.git git init --bare bar.git which used to create the repository in foo.git, but now will use bar.git. This is more sane, as command line options should generally override the environment. Noticed by Oliver Hoffmann. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-svn: mangle refnames forbidden in gitTorsten Schmutzler2010-05-092-0/+29
| | | | | | | | | | | | | | | | | | | | git-check-ref-format(1) describes names which cannot be used as refnames for git. Some are legal branchnames in subversion however. Mangle the not yet handled cases. Signed-off-by: Torsten Schmutzler <git-ts@theblacksun.eu> Acked-by: Eric Wong <normalperson@yhbt.net>
* | git-svn: Remove unused use of File::TempÆvar Arnfjörð Bjarmason2010-05-091-1/+0
| | | | | | | | | | | | | | | | | | The use line was added in ffe256f9. File::Temp calls were later moved to Git.pm in 0b19138b, but that commit neglected to remove the now-redundant import. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
* | git-svn documentation: minor grammar fixÆvar Arnfjörð Bjarmason2010-05-091-1/+1
| | | | | | | | | | | | | | Use the definite article when talking about a configuration property. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
* | git svn: avoid uninitialized var in 'reset'Jonathan Nieder2010-05-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | When "git svn reset" is called with an invalid revision, we bail out and show the user a proper error message instead of giving them a cryptic one related to git-svn internals. ref: http://bugs.debian.org/578908 Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Reported-by: Jens Seidel <jensseidel@users.sf.net> Acked-by: Eric Wong <normalperson@yhbt.net>
* | Start 1.7.2 cycleJunio C Hamano2010-05-083-2/+42
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'bg/apply-blank-trailing-context'Junio C Hamano2010-05-082-6/+18
|\ \ | | | | | | | | | | | | * bg/apply-blank-trailing-context: apply: Allow blank *trailing* context lines to match beyond EOF
| * | apply: Allow blank *trailing* context lines to match beyond EOFBjörn Gustavsson2010-04-072-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 51667147be, "git apply --whitespace=fix" was extended to allow a blank context line to match beyond the end of the file, but only if the context line was in the leading part of the hunk (i.e. the hunk inserted additional contents at the end of the file). Drop the restriction that the context line must be in the leading part of the hunk, thus allowing a file to be changed from: a (blank line) to: b a (blank line) Note that the blank line will be kept, because "--whitespace=fix" only removes trailing blank lines that a hunk would add, never trailing blank lines in the context. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'bg/send-email-smtpdomain'Junio C Hamano2010-05-083-26/+30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bg/send-email-smtpdomain: send-email: Cleanup smtp-domain and add config Document send-email --smtp-domain send-email: Don't use FQDNs without a '.' send-email: Cleanup { style
| * | | send-email: Cleanup smtp-domain and add configBrian Gernhardt2010-04-103-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way the code stored --smtp-domain was unlike its handling of other similar options. Bring it in line with the others by: - Renaming $mail_domain to $smtp_domain to match the command line option. Also move its declaration from near the top of the file to near other option variables. - Removing $mail_domain_default. The variable was used once and only served to move the default away from where it gets used. - Adding a sendemail.smtpdomain config option. smtp-domain was the only SMTP configuration option that couldn't be set in the user's .gitconfig. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Document send-email --smtp-domainBrian Gernhardt2010-04-101-0/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | send-email: Don't use FQDNs without a '.'Brian Gernhardt2010-04-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although Net::Domain::domainname attempts to be very thorough, the host's configuration can still refuse to give a FQDN. Check to see if what we receive contains a dot as a basic sanity check. Since the same condition is used twice and getting complex, let's move it to a new function. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | send-email: Cleanup { styleBrian Gernhardt2010-04-101-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Jakub Narebski pointed out on the list, Perl code usually prefers sub func { } over sub func { } git-send-email.perl is somewhat inconsistent in its style, with 23 subroutines using the first style and 6 using the second. Convert the few odd subroutines so that the code matches normal Perl style. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'rc/ls-remote-default'Junio C Hamano2010-05-082-4/+65
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * rc/ls-remote-default: ls-remote: fall-back to default remotes when no remote specified
| * | | | ls-remote: fall-back to default remotes when no remote specifiedTay Ray Chuan2010-04-082-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of breaking execution when no remote (as specified in the variable dest) is specified when git-ls-remote is invoked, continue on and let remote_get() handle it. This way, we are able to use the default remotes (eg. "origin", branch.<name>.remote), as git-fetch, git-push, and other users of remote_get(), do. If no suitable remote is found, exit with a message describing the issue, instead of just the usage text, as we do previously. Add several tests to check that git-ls-remote handles the no-remote-specified situation. Also add a test that "git ls-remote <pattern>" does not work; we are unable to guess the remote in that situation, as are git-fetch and git-push. In that test, we are testing for messages coming from two separate processes, but we should be OK, because the second message is triggered by closing the fd which must happen after the first message is printed. (analysis by Jeff King.) Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'rc/maint-curl-helper'Junio C Hamano2010-05-084-8/+38
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rc/maint-curl-helper: remote-curl: ensure that URLs have a trailing slash http: make end_url_with_slash() public t5541-http-push: add test for URLs with trailing slash Conflicts: remote-curl.c
| * | | | | remote-curl: ensure that URLs have a trailing slashTay Ray Chuan2010-04-092-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we blindly assumed that URLs passed to the remote-curl helper did not end with a trailing slash. Use the convenience function end_url_with_slash() from http.[ch] to ensure that URLs have a trailing slash on invocation of the remote-curl helper, and use the URL as one with a trailing slash throughout. It is possible for users to pass a URL with a trailing slash to remote-curl, by, say, setting it in remote.<name>.url in their git config. The resulting requests have an empty path component (//) and may break implementations of the http git protocol. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | http: make end_url_with_slash() publicTay Ray Chuan2010-04-092-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | t5541-http-push: add test for URLs with trailing slashTay Ray Chuan2010-04-091-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'hg/maint-attr-fix'Junio C Hamano2010-05-082-14/+39
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hg/maint-attr-fix: attr: Expand macros immediately when encountered. attr: Allow multiple changes to an attribute on the same line. attr: Fixed debug output for macro expansion.
| * | | | | | attr: Expand macros immediately when encountered.Henrik Grubbström2010-04-102-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using macros it is otherwise hard to know whether an attribute set by the macro should override an already set attribute. Consider the following .gitattributes file: [attr]mybinary binary -ident * ident foo.bin mybinary bar.bin mybinary ident Without this patch both foo.bin and bar.bin will have the ident attribute set, which is probably not what the user expects. With this patch foo.bin will have an unset ident attribute, while bar.bin will have it set. Signed-off-by: Henrik Grubbström <grubba@grubba.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | attr: Allow multiple changes to an attribute on the same line.Henrik Grubbström2010-04-102-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using macros it isn't inconceivable to have an attribute being set by a macro, and then being reset explicitly. Signed-off-by: Henrik Grubbström <grubba@grubba.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | attr: Fixed debug output for macro expansion.Henrik Grubbström2010-04-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debug_set() was called during macro expansion, it received a pointer to a struct git_attr rather than a string. Signed-off-by: Henrik Grubbström <grubba@grubba.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'eb/unpretty-b-format'Junio C Hamano2010-05-083-0/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eb/unpretty-b-format: Add `%B' in format strings for raw commit body in `git log' and friends
| * | | | | | | Add `%B' in format strings for raw commit body in `git log' and friendsEli Barzilay2010-04-053-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also update the documentation text and add a test. Signed-off-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'ab/commit-empty-message'Junio C Hamano2010-05-083-4/+38
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ab/commit-empty-message: Add option to git-commit to allow empty log messages
| * | | | | | | | Add option to git-commit to allow empty log messagesÆvar Arnfjörð Bjarmason2010-04-073-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change git-commit(1) to accept the --allow-empty-message option to allow a commit with an empty message. This is analogous to the existing --allow-empty option which allows a commit that records no changes. As these are mainly for interoperating with foreign SCM systems, and are not meant for normal use, ensure that "git commit -h" does not talk about them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jc/test-sleepless'Junio C Hamano2010-05-083-6/+7
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/test-sleepless: war on "sleep" in tests
| * | | | | | | | | war on "sleep" in testsJunio C Hamano2010-04-063-6/+7
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many places in test suite we have "sleep"s that do not have to be there. - I do not simply see the point of the one in t3500. It may be making sure that the timestamp order of commits generated during the test is stable, in which case test_tick is the right ingredient to use without wasting tester's time. - The one in t4011 is to make sure that the plumbing diff-index notices the stat-dirtyness of a removed then identically recreated symlink. Keeping the old symlink around to make sure that a newly created symlink gets different ino would be sufficient for that purpose. - The one in t7600 is to make sure that "git merge" does not get confused by stat-dirty "file" in the working tree. Again, keeping the old file around and creating an identical copy to ensure a different ino would be sufficient for that purpose. The "racy git" tests in t0010 are inherently about mtime between the index itself and index entries. The "sleep" in that test must stay as they are. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jc/maint-reflog-expire-unreachable'Junio C Hamano2010-05-081-40/+56
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-reflog-expire-unreachable: reflog --expire-unreachable: avoid merge-base computation
| * | | | | | | | | reflog --expire-unreachable: avoid merge-base computationJunio C Hamano2010-04-071-40/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option tells the command to expire older reflog entries that refer to commits that are no longer reachable from the tip of the ref the reflog is associated with. To avoid repeated merge_base() invocations, we used to mark commits that are known to be reachable by walking the history from the tip until we hit commits that are older than expire-total (which is the timestamp before which all the reflog entries are expired). However, it is a different matter if a commit is _not_ known to be reachable and the commit is known to be unreachable. Because you can rewind a ref to an ancient commit and then reset it back to the original tip, a recent reflog entry can point at a commit that older than the expire-total timestamp and we shouldn't expire it. For that reason, we had to run merge-base computation when a commit is _not_ known to be reachable. This introduces a lazy/on-demand traversal of the history to mark reachable commits in steps. As before, we mark commits that are newer than expire-total to optimize the normal case before walking reflog, but we dig deeper from the commits the initial step left off when we encounter a commit that is not known to be reachable. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'sd/log-decorate'Junio C Hamano2010-05-088-13/+118
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sd/log-decorate: log.decorate: only ignore it under "log --pretty=raw" script with rev-list instead of log log --pretty/--oneline: ignore log.decorate log.decorate: usability fixes Add `log.decorate' configuration variable. git_config_maybe_bool() Conflicts: builtin/log.c
| * | | | | | | | | | log.decorate: only ignore it under "log --pretty=raw"Junio C Hamano2010-04-082-30/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike notes that are often multi-line and disrupting to be placed in many output formats, a decoration is designed to be a small token that can be tacked after an existing line of the output where a commit object name sits. Disabling log.decorate for something like "log --oneline" would defeat the purpose of the configuration. We _might_ want to change it further in the future to force scripts that do not want to be broken by random end user configurations to explicitly say "log --no-decorate", but that would be an incompatible change that needs the usual multi-release-cycle deprecation process. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | script with rev-list instead of logJeff King2010-04-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because log.decorate now shows decorations for --pretty=oneline, we must explicitly turn it off when scripting. Otherwise, users with log.decorate set will get cruft like: $ git stash Saved working directory and index state WIP on master: 2c1f7f5 (HEAD, master) commit subject Instead of adding --no-decorate to the log command line, let's just use the rev-list plumbing interface instead, which does the right thing. git-submodule has a similar call. Since it just counts the commit lines, nothing is broken, but let's switch it, too, for the sake of consistency and cleanliness. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | log --pretty/--oneline: ignore log.decorateJunio C Hamano2010-04-062-16/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many scripts, most notably gitk, rely on output from the log family of command not to be molested by random user configuration. This is especially true when --pretty=raw is given. Just like we disable notes output unless the command line explicitly asks for --show-notes, disable the decoration code unless --decorate is given explicitly from the command line and --pretty or --oneline is given. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | log.decorate: usability fixesJunio C Hamano2010-02-173-11/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configuration is meant to suppliment --decorate command line option that can be used as a boolean to turn the feature on, so it is natural to expect [log] decorate decorate = yes to work. The original commit would segfault with the first one, and would not understand the second one. Once a user has this configuration in ~/.gitconfig, there needs to be a way to override it from the command line. Add --no-decorate option to log family and also allow --decorate=no to mean the same thing. Since we allow setting log.decorate to 'true', the command line also should accept --decorate=yes and behave accordingly. New tests in t4202 are designed to exercise the interaction between the configuration variable and the command line option that overrides it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | | Add `log.decorate' configuration variable.Steven Drake2010-02-172-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This alows the 'git-log --decorate' to be enabled by default so that normal log outout contains ant ref names of commits that are shown. Signed-off-by: Steven Drake <sdrake@xnet.co.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>