summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-22fmt_ident: drop IDENT_WARN_ON_NO_NAME codeLibravatar Jeff King2-10/+6
There are no more callers who want this, so we can drop it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-22format-patch: use default email for generating message idsLibravatar Jeff King1-8/+2
We try to generate a sane message id for cover letters and threading by appending some changing bits to the front of the user's email address. The current code parses the email out of the results of git_committer_info, but we can do this much more easily by just calling ident_default_email ourselves. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-22ident: trim trailing newline from /etc/mailnameLibravatar Jeff King1-0/+4
We use fgets to read the /etc/mailname file, which means we will typically end up with an extra newline in our git_default_email. Most of the time this doesn't matter, as fmt_ident will skip it as cruft, but there is one code path that accesses it directly (in http-push.c:lock_remote). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-22move git_default_* variables to ident.cLibravatar Jeff King3-6/+4
There's no reason anybody outside of ident.c should access these directly (they should use the new accessors which make sure the variables are initialized), so we can make them file-scope statics. While we're at it, move user_ident_explicitly_given into ident.c; while still globally visible, it makes more sense to reside with the ident code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-22move identity config parsing to ident.cLibravatar Jeff King3-23/+23
There's no reason for this to be in config, except that once upon a time all of the config parsing was there. It makes more sense to keep the ident code together. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-22fmt-merge-msg: don't use static buffer in record_personLibravatar Jeff King1-4/+4
The record_person function just parses out the "name" field of the person line in a commit and adds it to a string_list. The only reason we need an extra buffer is that the string_list functions require a NUL-terminated string. Instead of the static buffer, we can just allocate a temporary NUL-terminated copy. In addition to removing a useless limit, this removes the only user of MAX_GITNAME outside of ident.c. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-22http-push: do not access git_default_email directlyLibravatar Jeff King1-1/+1
By calling the ident_default_email accessor, we can be sure that the default value is actually filled-in. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-22ident: split setup_ident into separate functionsLibravatar Jeff King2-16/+22
This function sets up the default name, email, and date, and is not publicly available. Let's split it into three public functions so that callers can get just the parts they need. While we're at it, let's change the interface to simple accessors. The original function was called only by fmt_ident, and contained logic for "if we already have some other value, don't load the default" which properly belongs in fmt_ident. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11Update draft release notes to 1.7.11 (11th batch)Libravatar Junio C Hamano1-13/+8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11Merge branch 'ef/checkout-empty'Libravatar Junio C Hamano2-1/+12
Running "git checkout" on an unborn branch used to corrupt HEAD (regression in 1.7.10); this makes it error out. By Erik Faye-Lund * ef/checkout-empty: checkout: do not corrupt HEAD on empty repo
2012-05-11Merge branch 'jk/maint-reflog-walk-count-vs-time'Libravatar Junio C Hamano7-16/+82
Gives a better DWIM behaviour for --pretty=format:%gd, "stash list", and "log -g", depending on how the starting point ("master" vs "master@{0}" vs "master@{now}") and date formatting options (e.g. "--date=iso") are given on the command line. By Jeff King (4) and Junio C Hamano (1) * jk/maint-reflog-walk-count-vs-time: reflog-walk: tell explicit --date=default from not having --date at all reflog-walk: always make HEAD@{0} show indexed selectors reflog-walk: clean up "flag" field of commit_reflog struct log: respect date_mode_explicit with --format:%gd t1411: add more selector index/date tests
2012-05-11Merge branch 'nd/i18n-branch-lego'Libravatar Junio C Hamano1-9/+23
Fix yet another message construction by concatenating pieces of sentenes, which is unfriendly to i18n. By Nguyễn Thái Ngọc Duy * nd/i18n-branch-lego: branch: remove lego in i18n tracking info strings
2012-05-11Sync with 1.7.10.2Libravatar Junio C Hamano4-7/+22
2012-05-11Git 1.7.10.2Libravatar Junio C Hamano3-2/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11Merge branch 'jc/diff-algo-cleanup' into maintLibravatar Junio C Hamano8-25/+24
* jc/diff-algo-cleanup: xdiff: PATIENCE/HISTOGRAM are not independent option bits xdiff: remove XDL_PATCH_* macros
2012-05-11Merge branch 'ct/advise-push-default' into maintLibravatar Junio C Hamano10-13/+99
The cases "git push" fails due to non-ff can be broken into three categories; each case is given a separate advise message. By Christopher Tiwald (2) and Jeff King (1) * ct/advise-push-default: Fix httpd tests that broke when non-ff push advice changed clean up struct ref's nonfastforward field push: Provide situational hints for non-fast-forward errors
2012-05-11Merge branch 'js/fast-import-test-9300' into maintLibravatar Junio C Hamano1-34/+54
By Johannes Sixt * js/fast-import-test-9300: t9300-fast-import: avoid 'exit' in test_expect_success snippets
2012-05-11Merge branch 'jk/repack-no-explode-objects-from-old-pack' into maintLibravatar Junio C Hamano7-53/+107
"git repack" used to write out unreachable objects as loose objects when repacking, even if such loose objects will immediately pruned due to its age. By Jeff King * jk/repack-no-explode-objects-from-old-pack: gc: use argv-array for sub-commands argv-array: add a new "pushl" method argv-array: refactor empty_argv initialization gc: do not explode objects which will be immediately pruned
2012-05-11Merge branch 'ah/maint-grep-double-init' into maintLibravatar Junio C Hamano1-1/+1
By Angus Hammond * ah/maint-grep-double-init: grep.c: remove redundant line of code
2012-05-11Merge branch 'fa/maint-config-doc' into maintLibravatar Junio C Hamano1-5/+9
By Florian Achleitner * fa/maint-config-doc: Documentation/git-config: describe and clarify "--local <file>" option
2012-05-11Merge branch 'rs/unpack-trees-leakfix' into maintLibravatar Junio C Hamano1-10/+17
By René Scharfe * rs/unpack-trees-leakfix: unpack-trees: plug minor memory leak unpack-trees: don't perform any index operation if we're not merging
2012-05-11Merge branch 'sl/test-wc-l-line-count' into maintLibravatar Junio C Hamano19-74/+65
By Stefano Lattarini * sl/test-wc-l-line-count: tests: modernise style: more uses of test_line_count
2012-05-11Merge branch 'rl/show-empty-prefix' into maintLibravatar Junio C Hamano2-1/+3
Unlike "git rev-parse --show-cdup", "--show-prefix" did not give an empty line when run at the top of the working tree. By Ross Lagerwall * rl/show-empty-prefix: rev-parse --show-prefix: add in trailing newline
2012-05-11document submdule.$name.update=none option for gitmodulesLibravatar Heiko Voigt2-6/+6
This option was not yet described in the gitmodules documentation. We only described it in the 'git submodule' command documentation but gitmodules is the more natural place to look. A short reference in the 'git submodule' documentation should be sufficient since the details can now be found in the documentation to gitmodules. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-10The tenth batch of topicsLibravatar Junio C Hamano1-14/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-10Merge branch 'rs/dir-strbuf'Libravatar Junio C Hamano1-39/+37
By René Scharfe * rs/dir-strbuf: dir: convert to strbuf
2012-05-10Merge branch 'nd/i18n-apply-lego'Libravatar Junio C Hamano1-4/+11
By Nguyễn Thái Ngọc Duy * nd/i18n-apply-lego: apply: remove lego in i18n string in gitdiff_verify_name
2012-05-10Merge branch 'jk/status-porcelain-z-b'Libravatar Junio C Hamano5-95/+110
"git status --porcelain" ignored "--branch" option by mistake. The output for "git status --branch -z" was also incorrect and did not terminate the record for the current branch name with NUL as asked. By Jeff King via Jeff King * jk/status-porcelain-z-b: status: refactor colopts handling status: respect "-b" for porcelain format status: fix null termination with "-b" status: refactor null_termination option commit: refactor option parsing
2012-05-10Merge branch 'fa/maint-config-doc'Libravatar Junio C Hamano1-5/+9
By Florian Achleitner * fa/maint-config-doc: Documentation/git-config: describe and clarify "--local <file>" option
2012-05-10Merge branch 'ef/maint-clone-progress-fix'Libravatar Junio C Hamano1-1/+1
Some time ago, "git clone" lost the progress output for its "checkout" phase; when run without any "--quiet" option, it should give progress to the lengthy operation. By Erik Faye-Lund * ef/maint-clone-progress-fix: clone: fix progress-regression
2012-05-10Merge branch 'ah/maint-grep-double-init'Libravatar Junio C Hamano1-1/+1
By Angus Hammond * ah/maint-grep-double-init: grep.c: remove redundant line of code
2012-05-10Merge branch 'js/checkout-detach-count'Libravatar Junio C Hamano2-11/+23
When checking out another commit from an already detached state, we used to report all commits that are not reachable from any of the refs as lossage, but some of them might be reachable from the new HEAD, and there is no need to warn about them. By Johannes Sixt * js/checkout-detach-count: checkout (detached): truncate list of orphaned commits at the new HEAD t2020-checkout-detach: check for the number of orphaned commits
2012-05-10Merge branch 'jc/install-no-hardlinks'Libravatar Junio C Hamano1-1/+11
Your build platform may support hardlinks but you may prefer not to use them, e.g. when installing to DESTDIR to make a tarball and untarring on a filesystem that has poor support for hardlinks. The Makefile in git-gui project may need to learn to honor the same setting; it unconditionally creates git-citool by hardlinking git-gui. * jc/install-no-hardlinks: Makefile: NO_INSTALL_HARDLINKS
2012-05-10Merge branch 'nd/stream-to-archive'Libravatar Junio C Hamano8-135/+404
Stream large blobs directly out to archive files without slurping everything in memory first. By René Scharfe (6) and Nguyễn Thái Ngọc Duy (4) * nd/stream-to-archive: t5000: rationalize unzip tests archive-zip: streaming for deflated files archive-zip: streaming for stored files archive-zip: factor out helpers for writing sizes and CRC archive-zip: remove uncompressed_size archive-tar: stream large blobs to tar file archive: delegate blob reading to backend archive-tar: unindent write_tar_entry by one level archive-tar: turn write_tar_entry into blob-writing only streaming: void pointer instead of char pointer
2012-05-10Merge branch 'mh/ref-api-lazy-loose'Libravatar Junio C Hamano2-137/+247
Refs API is updated to lazily read sub-hierarchies of refs/ namespace, so that we do not have to grab everything from the filesystem when we are only interested in listing branches, for example. By Michael Haggerty (17) and Junio C Hamano (1) * mh/ref-api-lazy-loose: refs: fix find_containing_dir() regression refs: read loose references lazily read_loose_refs(): eliminate ref_cache argument struct ref_dir: store a reference to the enclosing ref_cache search_for_subdir(): return (ref_dir *) instead of (ref_entry *) get_ref_dir(): add function for getting a ref_dir from a ref_entry read_loose_refs(): rename function from get_ref_dir() refs: wrap top-level ref_dirs in ref_entries find_containing_dir(): use strbuf in implementation of this function bisect: copy filename string obtained from git_path() do_for_each_reflog(): use a strbuf to hold logfile name do_for_each_reflog(): return early on error get_ref_dir(): take the containing directory as argument refs.c: extract function search_for_subdir() get_ref_dir(): require that the dirname argument ends in '/' get_ref_dir(): rename "base" parameter to "dirname" get_ref_dir(): use a strbuf to hold refname get_ref_dir(): return early if directory cannot be read
2012-05-10Merge branch 'maint'Libravatar Junio C Hamano1-0/+25
2012-05-10Update draft release notes to 1.7.10.2Libravatar Junio C Hamano1-0/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-10Merge branch 'mm/include-userpath' into maintLibravatar Junio C Hamano3-1/+18
By Jeff King * mm/include-userpath: config: expand tildes in include.path variable
2012-05-10Merge branch 'cc/fix-missing-va-end-in-revert' into maintLibravatar Junio C Hamano1-0/+1
By Christian Couder * cc/fix-missing-va-end-in-revert: revert: add missing va_end
2012-05-10Merge branch 'bw/test-fix-grep-gnuism' into maintLibravatar Junio C Hamano1-2/+2
* bw/test-fix-grep-gnuism: t9400: fix gnuism in grep
2012-05-10Merge branch 'jk/http-backend-keep-committer-ident-env' into maintLibravatar Junio C Hamano3-13/+37
By Jeff King * jk/http-backend-keep-committer-ident-env: http-backend: respect existing GIT_COMMITTER_* variables Conflicts: t/t5541-http-push.sh
2012-05-10Merge branch 'nl/rebase-i-cheat-sheet' into maintLibravatar Junio C Hamano1-0/+2
* nl/rebase-i-cheat-sheet: rebase -i: remind that the lines are top-to-bottom
2012-05-10Merge branch 'bw/submodule-sed-solaris' into maintLibravatar Junio C Hamano1-2/+3
By Ben Walton * bw/submodule-sed-solaris: Avoid bug in Solaris xpg4/sed as used in submodule
2012-05-10Merge branch 'jk/maint-push-progress' into maintLibravatar Junio C Hamano3-2/+39
"git push" over smart-http lost progress output a few releases ago. By Jeff King * jk/maint-push-progress: t5541: test more combinations of --progress teach send-pack about --[no-]progress send-pack: show progress when isatty(2)
2012-05-10Merge branch 'jc/rerere-train' into maintLibravatar Junio C Hamano1-1/+1
A contrib script "rerere-train" did not work out of the box unless user futzed with her $PATH. * jc/rerere-train: contrib/rerere-train: use installed git-sh-setup
2012-05-10Merge branch 'lp/diffstat-with-graph' into maintLibravatar Junio C Hamano5-6/+131
"log --graph" was not very friendly with "--stat" option and its output had line breaks at wrong places. By Lucian Poston (5) and Zbigniew Jędrzejewski-Szmek (3) * lp/diffstat-with-graph: t4052: work around shells unable to set COLUMNS to 1 test-lib: skip test with COLUMNS=1 under mksh Prevent graph_width of stat width from falling below min t4052: Test diff-stat output with minimum columns t4052: Adjust --graph --stat output for prefixes Adjust stat width calculations to take --graph output into account Add output_prefix_length to diff_options t4052: test --stat output with --graph
2012-05-08checkout: do not corrupt HEAD on empty repoLibravatar Erik Faye-Lund2-1/+12
In abe1998 ("git checkout -b: allow switching out of an unborn branch"), a code-path overly-optimisticly assumed that a branch-name was specified. This is not always the case, and as a result a NULL-pointer was attempted printed to .git/HEAD. This could lead to at least two different failure modes: 1) vsnprintf formated the NULL-string as something useful (e.g "(null)") 2) vsnprintf crashed Neither were very convenient for formatting a new HEAD-reference. To fix this, reintroduce some strictness so we only take this new codepath if a banch-name was specified. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-08apply: remove lego in i18n string in gitdiff_verify_nameLibravatar Nguyễn Thái Ngọc Duy1-4/+11
It marks the string "...inconsistent %s filename..." where %s is either "old" or "new" from caller. Make it two strings "...inconsistent new filename..." and "...inconsistent old filename...". Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-08Merge branch 'rs/maint-dir-strbuf' into rs/dir-strbufLibravatar Junio C Hamano1-39/+37
By René Scharfe * rs/maint-dir-strbuf: dir: convert to strbuf
2012-05-08dir: convert to strbufLibravatar René Scharfe1-39/+36
The functions read_directory_recursive() and treat_leading_path() both use buffers sized to fit PATH_MAX characters. The latter can be made to overrun its buffer, e.g. like this: $ a=0123456789abcdef $ a=$a$a$a$a$a$a$a$a $ a=$a$a$a$a$a$a$a$a $ a=$a$a$a$a$a$a$a$a $ git add $a/a Instead of trying to add a check and potentionally forgetting to address similar cases, convert the involved functions and their helpers to use struct strbuf. The patch is suprisingly large because the helpers treat_path() and treat_one_path() modify the buffer as well and thus need to be converted, too. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>