summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2013-07-22Merge branch 'db/show-ref-head'Libravatar Junio C Hamano1-2/+6
The "--head" option to "git show-ref" was only to add "HEAD" to the list of candidate refs to be filtered by the usual rules (e.g. "--heads" that only show refs under refs/heads). Change the meaning of the option to always show "HEAD" regardless of what filtering will be applied to any other ref (this is a backward incompatible change, so I may need to add an entry to the Release Notes). * db/show-ref-head: show-ref: make --head always show the HEAD ref
2013-07-22Merge branch 'tr/do-not-call-submodules-subprojects'Libravatar Junio C Hamano2-3/+3
* tr/do-not-call-submodules-subprojects: show-branch: fix description of --date-order apply, entry: speak of submodules instead of subprojects
2013-07-22Merge branch 'mm/color-auto-default'Libravatar Junio C Hamano1-0/+1
A finishing touch to fix breakage to "add -e" caused by defaulting ui.color to "auto". * mm/color-auto-default: git add -e: Explicitly specify that patch should have no color
2013-07-19git add -e: Explicitly specify that patch should have no colorLibravatar Andrew Wong1-0/+1
After 4c7f1819 (make color.ui default to 'auto', 2013-06-10), the patch file to be edited during 'git add -e' receives all the color codes. This is because diffopt.use_color defaults to -1, which causes want_color to now return 'auto'. By explicitly setting use_color to 0, we can ensure the diff output has no color codes in it. Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-19Sync with maintLibravatar Junio C Hamano1-1/+1
2013-07-19apply.c::find_name_traditional(): do not initialize len to the line's lengthLibravatar Stefan Beller1-1/+1
The variable len is set to len = strchrnul(line, '\n') - line; unconditionally 9 lines later, hence we can remove the call to strlen. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-19Merge branch 'rs/logical-vs-binary-or' into maintLibravatar Junio C Hamano3-6/+6
* rs/logical-vs-binary-or: use logical OR (||) instead of binary OR (|) in logical context
2013-07-18Merge branch 'jk/in-pack-size-measurement'Libravatar Junio C Hamano1-37/+173
"git cat-file --batch-check=<format>" is added, primarily to allow on-disk footprint of objects in packfiles (often they are a lot smaller than their true size, when expressed as deltas) to be reported. * jk/in-pack-size-measurement: pack-revindex: radix-sort the revindex pack-revindex: use unsigned to store number of objects cat-file: split --batch input lines on whitespace cat-file: add %(objectsize:disk) format atom cat-file: add --batch-check=<format> cat-file: refactor --batch option parsing cat-file: teach --batch to stream blob objects t1006: modernize output comparisons teach sha1_object_info_extended a "disk_size" query zero-initialize object_info structs
2013-07-18Merge branch 'jk/maint-clone-shared-no-connectivity-validation'Libravatar Junio C Hamano1-9/+12
"git clone -s/-l" is a filesystem level copy and does not offer any protection against source repository being corrupt. While the connectivity validation checks commits and trees being readable, it made the otherwise instantaneous local modes of clone much more expensive, without protecting blob data from bitflips. * jk/maint-clone-shared-no-connectivity-validation: clone: drop connectivity check for local clones
2013-07-18show-branch: fix description of --date-orderLibravatar Thomas Rast1-3/+3
The existing description reads as if it somehow applies a filter. Change it to explain that it is merely about the ordering. Message-proposed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18apply, entry: speak of submodules instead of subprojectsLibravatar Thomas Rast1-1/+1
There are only four (with some generous rounding) instances in the current source code where we speak of "subproject" instead of "submodule". They are as follows: * one error message in git-apply and two in entry.c * the patch format for submodule changes The latter was introduced in 0478675 (Expose subprojects as special files to "git diff" machinery, 2007-04-15), apparently before the terminology was settled. We can of course not change the patch format. Let's at least change the error messages to consistently call them "submodule". Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17show-ref: make --head always show the HEAD refLibravatar Doug Bell1-2/+6
The docs seem to say that doing git show-ref --head --tags would show both the HEAD ref and all the tag refs. However, doing both --head and either of --tags or --heads would filter out the HEAD ref. Also update the documentation to describe the new behavior and add tests for the show-ref command. [jc: Doug did proofread the tests, but it was done by me and bugs in it are mine]. Signed-off-by: Doug Bell <madcityzen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-15Merge branch 'tr/maint-apply-non-git-patch-parsefix' into maintLibravatar Junio C Hamano1-1/+1
"git apply" parsed patches that add new files, generated by programs other than Git, incorrectly. This is an old breakage in v1.7.11. * tr/maint-apply-non-git-patch-parsefix: apply: carefully strdup a possibly-NULL name
2013-07-15Merge branch 'jk/format-patch-from'Libravatar Junio C Hamano1-0/+24
"git format-patch" learned "--from[=whom]" option, which sets the "From: " header to the specified person (or the person who runs the command, if "=whom" part is missing) and move the original author information to an in-body From: header as necessary. * jk/format-patch-from: teach format-patch to place other authors into in-body "From" pretty.c: drop const-ness from pretty_print_context
2013-07-15Merge branch 'mv/merge-ff-tristate'Libravatar Junio C Hamano1-22/+33
The configuration variable "merge.ff" was cleary a tri-state to choose one from "favor fast-forward when possible", "always create a merge even when the history could fast-forward" and "do not create any merge, only update when the history fast-forwards", but the command line parser did not implement the usual convention of "last one wins, and command line overrides the configuration" correctly. * mv/merge-ff-tristate: merge: handle --ff/--no-ff/--ff-only as a tri-state option
2013-07-12Merge branch 'ms/remote-tracking-branches-in-doc'Libravatar Junio C Hamano2-3/+3
* ms/remote-tracking-branches-in-doc: Change "remote tracking" to "remote-tracking"
2013-07-12Merge branch 'jk/pull-to-integrate'Libravatar Junio C Hamano1-6/+6
* jk/pull-to-integrate: pull: change the description to "integrate" changes push: avoid suggesting "merging" remote changes
2013-07-12Merge branch 'as/log-output-encoding-in-user-format'Libravatar Junio C Hamano3-1/+6
"log --format=" did not honor i18n.logoutputencoding configuration and this attempts to fix it. * as/log-output-encoding-in-user-format: t4205 (log-pretty-formats): avoid using `sed` t6006 (rev-list-format): add tests for "%b" and "%s" for the case i18n.commitEncoding is not set t4205, t6006, t7102: make functions better readable t4205 (log-pretty-formats): revert back single quotes t4041, t4205, t6006, t7102: use iso8859-1 rather than iso-8859-1 t4205: replace .\+ with ..* in sed commands pretty: --format output should honor logOutputEncoding pretty: Add failing tests: --format output should honor logOutputEncoding t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs t7102 (reset): don't hardcode SHA-1 in expected outputs t6006 (rev-list-format): don't hardcode SHA-1 in expected outputs
2013-07-12cat-file: split --batch input lines on whitespaceLibravatar Jeff King1-1/+19
If we get an input line to --batch or --batch-check that looks like "HEAD foo bar", we will currently feed the whole thing to get_sha1(). This means that to use --batch-check with `rev-list --objects`, one must pre-process the input, like: git rev-list --objects HEAD | cut -d' ' -f1 | git cat-file --batch-check Besides being more typing and slightly less efficient to invoke `cut`, the result loses information: we no longer know which path each object was found at. This patch teaches cat-file to split input lines at the first whitespace. Everything to the left of the whitespace is considered an object name, and everything to the right is made available as the %(reset) atom. So you can now do: git rev-list --objects HEAD | git cat-file --batch-check='%(objectsize) %(rest)' to collect object sizes at particular paths. Even if %(rest) is not used, we always do the whitespace split (which means you can simply eliminate the `cut` command from the first example above). This whitespace split is backwards compatible for any reasonable input. Object names cannot contain spaces, so any input with spaces would have resulted in a "missing" line. The only input hurt is if somebody really expected input of the form "HEAD is a fine-looking ref!" to fail; it will now parse HEAD, and make "is a fine-looking ref!" available as %(rest). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-12cat-file: add %(objectsize:disk) format atomLibravatar Jeff King1-0/+6
This atom is just like %(objectsize), except that it shows the on-disk size of the object rather than the object's true size. In other words, it makes the "disk_size" query of sha1_object_info_extended available via the command-line. This can be used for rough attribution of disk usage to particular refs, though see the caveats in the documentation. This patch does not include any tests, as the exact numbers returned are volatile and subject to zlib and packing decisions. We cannot even reliably guarantee that the on-disk size is smaller than the object content (though in general this should be the case for non-trivial objects). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-12cat-file: add --batch-check=<format>Libravatar Jeff King1-15/+92
The `cat-file --batch-check` command can be used to quickly get information about a large number of objects. However, it provides a fixed set of information. This patch adds an optional <format> option to --batch-check to allow a caller to specify which items they are interested in, and in which order to output them. This is not very exciting for now, since we provide the same limited set that you could already get. However, it opens the door to adding new format items in the future without breaking backwards compatibility (or forcing callers to pay the cost to calculate uninteresting items). Since the --batch option shares code with --batch-check, it receives the same feature, though it is less likely to be of interest there. The format atom names are chosen to match their counterparts in for-each-ref. Though we do not (yet) share any code with for-each-ref's formatter, this keeps the interface as consistent as possible, and may help later on if the implementations are unified. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-11Merge branch 'jg/status-config'Libravatar Junio C Hamano1-19/+64
"git status" learned status.branch and status.short configuration variables to use --branch and --short options by default (override with --no-branch and --no-short options from the command line). * jg/status-config: status/commit: make sure --porcelain is not affected by user-facing config commit: make it work with status.short status: introduce status.branch to enable --branch by default status: introduce status.short to enable --short by default
2013-07-11Merge branch 'rr/rebase-checkout-reflog'Libravatar Junio C Hamano1-3/+8
Invocations of "git checkout" used internally by "git rebase" were counted as "checkout", and affected later "git checkout -" to the the user to an unexpected place. * rr/rebase-checkout-reflog: checkout: respect GIT_REFLOG_ACTION status: do not depend on rebase reflog messages t/t2021-checkout-last: "checkout -" should work after a rebase finishes wt-status: remove unused field in grab_1st_switch_cbdata t7512: test "detached from" as well
2013-07-11Merge branch 'jc/triangle-push-fixup'Libravatar Junio C Hamano1-12/+31
Earlier remote.pushdefault (and per-branch branch.*.pushremote) were introduced as an additional mechanism to choose what repository to push into when "git push" did not say it from the command line, to help people who push to a repository that is different from where they fetch from. This attempts to finish that topic by teaching the default mechanism to choose branch in the remote repository to be updated by such a push. The 'current', 'matching' and 'nothing' modes (specified by the push.default configuration variable) extend to such a "triangular" workflow naturally, but 'upstream' and 'simple' have to be updated. . 'upstream' is about pushing back to update the branch in the remote repository that the current branch fetches from and integrates with, it errors out in a triangular workflow. . 'simple' is meant to help new people by avoiding mistakes, and will be the safe default in Git 2.0. In a non-triangular workflow, it will continue to act as a cross between 'upstream' and 'current' in that it pushes to the current branch's @{upstream} only when it is set to the same name as the current branch (e.g. your 'master' forks from the 'master' from the central repository). In a triangular workflow, this series tentatively defines it as the same as 'current', but we may have to tighten it to avoid surprises in some way. * jc/triangle-push-fixup: t/t5528-push-default: test pushdefault workflows t/t5528-push-default: generalize test_push_* push: change `simple` to accommodate triangular workflows config doc: rewrite push.default section t/t5528-push-default: remove redundant test_config lines
2013-07-11cat-file: refactor --batch option parsingLibravatar Jeff King1-18/+38
We currently use an int to tell us whether --batch parsing is on, and if so, whether we should print the full object contents. Let's instead factor this into a struct, filled in by callback, which will make further batch-related options easy to add. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-11cat-file: teach --batch to stream blob objectsLibravatar Jeff King1-13/+28
The regular "git cat-file -p" and "git cat-file blob" code paths already learned to stream large blobs. Let's do the same here. Note that this means we look up the type and size before making a decision of whether to load the object into memory or stream (just like the "-p" code path does). That can lead to extra work, but it should be dwarfed by the cost of actually accessing the object itself. In my measurements, there was a 1-2% slowdown when using "--batch" on a large number of objects. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-08clone: drop connectivity check for local clonesLibravatar Jeff King1-4/+7
Commit 0433ad1 (clone: run check_everything_connected, 2013-03-25) added the same connectivity check to clone that we use for fetching. The intent was to provide enough safety checks that "git clone git://..." could be counted on to detect bit errors and other repo corruption, and not silently propagate them to the clone. For local clones, this turns out to be a bad idea, for two reasons: 1. Local clones use hard linking (or even shared object stores), and so complete far more quickly. The time spent on the connectivity check is therefore proportionally much more painful. 2. Local clones do not actually meet our safety guarantee anyway. The connectivity check makes sure we have all of the objects we claim to, but it does not check for bit errors. We will notice bit errors in commits and trees, but we do not load blob objects at all. Whereas over the pack transport, we actually recompute the sha1 of each object in the incoming packfile; bit errors change the sha1 of the object, which is then caught by the connectivity check. This patch drops the connectivity check in the local case. Note that we have to revert the changes from 0433ad1 to t5710, as we no longer notice the corruption during clone. We could go a step further and provide a "verify even local clones" option, but it is probably not worthwhile. You can already spell that as "cd foo.git && git fsck && git clone ." or as "git clone --no-local foo.git". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-07push: avoid suggesting "merging" remote changesLibravatar John Keeping1-6/+6
With some workflows, it is more suitable to rebase on top of remote changes when a push does not fast-forward. Change the advice messages in git-push to suggest that a user "integrate the remote changes" instead of "merge the remote changes" to make this slightly clearer. Also change the suggested 'git pull' to 'git pull ...' to hint to users that they may want to add other parameters. Suggested-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-03Merge branch 'vv/help-unknown-ref' into maintLibravatar Junio C Hamano1-1/+2
* vv/help-unknown-ref: merge: use help_unknown_ref() help: add help_unknown_ref()
2013-07-03Change "remote tracking" to "remote-tracking"Libravatar Michael Schubert2-3/+3
Fix a typo ("remote remote-tracking") going back to the big cleanup in 2010 (8b3f3f84 etc). Also, remove some more occurrences of "tracking" and "remote tracking" in favor of "remote-tracking". Signed-off-by: Michael Schubert <mschub@elegosoft.com> Reviewed-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-03teach format-patch to place other authors into in-body "From"Libravatar Jeff King1-0/+24
Format-patch generates emails with the "From" address set to the author of each patch. If you are going to send the emails, however, you would want to replace the author identity with yours (if they are not the same), and bump the author identity to an in-body header. Normally this is handled by git-send-email, which does the transformation before sending out the emails. However, some workflows may not use send-email (e.g., imap-send, or a custom script which feeds the mbox to a non-git MUA). They could each implement this feature themselves, but getting it right is non-trivial (one must canonicalize the identities by reversing any RFC2047 encoding or RFC822 quoting of the headers, which has caused many bugs in send-email over the years). This patch takes a different approach: it teaches format-patch a "--from" option which handles the ident check and in-body header while it is writing out the email. It's much simpler to do at this level (because we haven't done any quoting yet), and any workflow based on format-patch can easily turn it on. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-02merge: handle --ff/--no-ff/--ff-only as a tri-state optionLibravatar Miklos Vajna1-22/+33
These three options mean "favor fast-forwarding when possible, without creating an unnecessary merge", "never fast-forward and always create a merge commit even when the commit being merged is a strict descendant", and "we do not want to create any merge commit; update only when the merged commit is a strict descendant". They are "pick one out of these three possibilities" options, and correspond to "merge.ff" configuration that is tri-state (yes, no and only). However, the implementation did not follow the usual convention for the command line options (later one wins, and command line overrides what is in the configuration). Fix this by consolidating two variables (fast_forward_only and allow_fast_forward) used in the implementation into one enum that can take one of the three possible values. Signed-off-by: Miklos Vajna <vmiklos@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-01Merge branch 'jc/topo-author-date-sort'Libravatar Junio C Hamano2-7/+9
"git log" learned the "--author-date-order" option, with which the output is topologically sorted and commits in parallel histories are shown intermixed together based on the author timestamp. * jc/topo-author-date-sort: t6003: add --author-date-order test topology tests: teach a helper to set author dates as well t6003: add --date-order test topology tests: teach a helper to take abbreviated timestamps t/lib-t6000: style fixes log: --author-date-order sort-in-topological-order: use prio-queue prio-queue: priority queue of pointers to structs toposort: rename "lifo" field
2013-06-30Merge branch 'mh/ref-races'Libravatar Junio C Hamano2-6/+11
"git pack-refs" that races with new ref creation or deletion have been susceptible to lossage of refs under right conditions, which has been tightened up. * mh/ref-races: for_each_ref: load all loose refs before packed refs get_packed_ref_cache: reload packed-refs file when it changes add a stat_validity struct Extract a struct stat_data from cache_entry packed_ref_cache: increment refcount when locked do_for_each_entry(): increment the packed refs cache refcount refs: manage lifetime of packed refs cache via reference counting refs: implement simple transactions for the packed-refs file refs: wrap the packed refs cache in a level of indirection pack_refs(): split creation of packed refs and entry writing repack_without_ref(): split list curation and entry writing
2013-06-30Merge branch 'nk/name-rev-abbreviated-refs'Libravatar Junio C Hamano1-7/+29
"git name-rev --refs=tags/v*" were forbidden, which was a bit inconvenient (you had to give a pattern to match refs fully, like --refs=refs/tags/v*). * nk/name-rev-abbreviated-refs: name-rev: allow to specify a subpath for --refs option
2013-06-30Merge branch 'jk/submodule-subdirectory-ok'Libravatar Junio C Hamano1-5/+19
Allow various subcommands of "git submodule" to be run not from the top of the working tree of the superproject. * jk/submodule-subdirectory-ok: submodule: drop the top-level requirement rev-parse: add --prefix option submodule: show full path in error message t7403: add missing && chaining t7403: modernize style t7401: make indentation consistent
2013-06-28Merge branch 'nd/clone-connectivity-shortcut' (early part) into maintLibravatar Junio C Hamano1-0/+4
Cloning with "git clone --depth N" while fetch.fsckobjects (or transfer.fsckobjects) is set to true did not tell the cut-off points of the shallow history to the process that validates the objects and the history received, causing the validation to fail. * 'nd/clone-connectivity-shortcut' (early part): fetch-pack: prepare updated shallow file before fetching the pack clone: let the user know when check_everything_connected is run
2013-06-27Merge branch 'rr/push-head' into maintLibravatar Junio C Hamano1-7/+14
* rr/push-head: push: make push.default = current use resolved HEAD push: fail early with detached HEAD and current push: factor out the detached HEAD error message
2013-06-27Merge branch 'rs/commit-m-no-edit' into maintLibravatar Junio C Hamano1-4/+6
* rs/commit-m-no-edit: commit: don't start editor if empty message is given with -m
2013-06-27Merge branch 'jh/checkout-auto-tracking' into maintLibravatar Junio C Hamano1-20/+22
* jh/checkout-auto-tracking: glossary: Update and rephrase the definition of a remote-tracking branch branch.c: Validate tracking branches with refspecs instead of refs/remotes/* t9114.2: Don't use --track option against "svn-remote"-tracking branches t7201.24: Add refspec to keep --track working t3200.39: tracking setup should fail if there is no matching refspec. checkout: Use remote refspecs when DWIMming tracking branches t2024: Show failure to use refspec when DWIMming remote branch names t2024: Add tests verifying current DWIM behavior of 'git checkout <branch>'
2013-06-27Merge branch 'bc/checkout-tracking-name-plug-leak'Libravatar Junio C Hamano1-2/+5
Plug a small leak in checkout. * bc/checkout-tracking-name-plug-leak: t/t9802: explicitly name the upstream branch to use as a base builtin/checkout.c: don't leak memory in check_tracking_name
2013-06-26Merge branch 'tr/maint-apply-non-git-patch-parsefix'Libravatar Junio C Hamano1-1/+1
Fix for the codepath to parse patches that add new files, generated by programs other than Git. THis is an old breakage in v1.7.11 and will need to be merged down to the maintanance tracks. * tr/maint-apply-non-git-patch-parsefix: apply: carefully strdup a possibly-NULL name
2013-06-26Merge branch 'ph/builtin-srcs-are-in-subdir-these-days'Libravatar Junio C Hamano3-4/+2
* ph/builtin-srcs-are-in-subdir-these-days: fix "builtin-*" references to be "builtin/*"
2013-06-26pretty: --format output should honor logOutputEncodingLibravatar Alexey Shumkin3-1/+6
One can set an alias $ git config [--global] alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit --date=local" to see the log as a pretty tree (like *gitk* but in a terminal). However, log messages written in an encoding i18n.commitEncoding which differs from terminal encoding are shown corrupted even when i18n.logOutputEncoding and terminal encoding are the same (e.g. log messages committed on a Cygwin box with Windows-1251 encoding seen on a Linux box with a UTF-8 encoding and vice versa). To simplify an example we can say the following two commands are expected to give the same output to a terminal: $ git log --oneline --no-color $ git log --pretty=format:'%h %s' However, the former pays attention to i18n.logOutputEncoding configuration, while the latter does not when it formats "%s". The same corruption is true for $ git diff --submodule=log and $ git rev-list --pretty=format:%s HEAD and $ git reset --hard This patch makes pretty --format honor logOutputEncoding when it formats log message. Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-24Merge branch 'mm/rm-coalesce-errors'Libravatar Junio C Hamano1-19/+82
Give a single message followed by list of paths from "git rm" to report multiple paths that cannot be removed. * mm/rm-coalesce-errors: rm: introduce advice.rmHints to shorten messages rm: better error message on failure for multiple files
2013-06-24Merge branch 'jh/libify-note-handling'Libravatar Junio C Hamano2-133/+6
Make it possible to call into copy-notes API from the sequencer code. * jh/libify-note-handling: Move create_notes_commit() from notes-merge.c into notes-utils.c Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c finish_copy_notes_for_rewrite(): Let caller provide commit message
2013-06-24status/commit: make sure --porcelain is not affected by user-facing configLibravatar Junio C Hamano1-22/+55
The recent addition of status.branch started affecting what is shown when "git status --porcelain" is run by mistake. Identify the configuration items that should be ignored under "--porcelain" option, introduce a "deferred config" mechanism to keep the values read from the configuration, and decide what value to use only after we read both from configuration and command line. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-24commit: make it work with status.shortLibravatar Ramkumar Ramachandra1-0/+1
With "status.short" set, it is now impossible to commit with status.short set, because it acts like "git commit --short", and it is impossible to differentiate between a status_format set by the command-line option parser versus that set by the config parser. To alleviate this problem, clear status_format as soon as the config parser has finished its work. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-24status: introduce status.branch to enable --branch by defaultLibravatar Jorge Juan Garcia Garcia1-0/+4
Some people often run 'git status -b'. The config variable status.branch allows to set it by default. Signed-off-by: Jorge Juan Garcia Garcia <Jorge-Juan.Garcia-Garcia@ensimag.imag.fr> Signed-off-by: Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr> Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-24status: introduce status.short to enable --short by defaultLibravatar Jorge Juan Garcia Garcia1-0/+7
Some people always run 'git status -s'. The configuration variable status.short allows to set it by default. Signed-off-by: Jorge Juan Garcia Garcia <Jorge-Juan.Garcia-Garcia@ensimag.imag.fr> Signed-off-by: Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr> Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>