summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-21git add: rephrase the "removal will cease to be ignored" warningLibravatar Junio C Hamano1-7/+14
Now the logic to decide when to warn has been tightened, we know the user is in a situation where the current and future behaviours will be different. Spell out what happens with these two versions and how to explicitly ask for the behaviour, and suggest "git status" as a way to inspect the current status. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-17git add: rework the logic to warn "git add <pathspec>..." default changeLibravatar Junio C Hamano1-26/+38
The earlier logic to warn against "git add subdir" that is run without "-A" or "--no-all" was only to check any <pathspec> given exactly spells a directory name that (still) exists on the filesystem. This had number of problems: * "git add '*dir'" (note that the wildcard is hidden from the shell) would not trigger the warning. * "git add '*.py'" would behave differently between the current version of Git and Git 2.0 for the same reason as "subdir", but would not trigger the warning. * "git add dir" for a submodule "dir" would just update the index entry for the submodule "dir" without ever recursing into it, and use of "-A" or "--no-all" would matter. But the logic only checks the directory-ness of "dir" and gives an unnecessary warning. Rework the logic to detect the case where the behaviour will be different in Git 2.0, and issue a warning only when it matters. Even with the code before this warning, "git add subdir" will have to traverse the directory in order to find _new_ files the index does not know about _anyway_, so we can do this check without adding an extra pass to find if <pathspec> matches any removed file. This essentially updates the "add_files_to_cache()" public API to "update_files_in_cache()" API that is internal to "git add", because with the "--all" option, the function is no longer about "adding" paths to the cache, but is also used to remove them. There are other callers of the former from "checkout" (used when "checkout -m" prepares the temporary tree that represents the local modifications to be merged) and "commit" ("commit --include" that picks up local changes in addition to what is in the index). Since ADD_CACHE_IGNORE_ERRORS (aka "--no-all") is not used by either of them, once dust settles after Git 2.0 and the warning becomes unnecessary, we may want to unify these two functions again. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-08git add: start preparing for "git add <pathspec>..." to default to "-A"Libravatar Junio C Hamano3-6/+59
When "git add subdir/" is run without "-u" or "-A" option, e.g. $ edit subdir/x $ create subdir/y $ rm subdir/z $ git add subdir/ the command does not notice removal of paths (e.g. subdir/z) from the working tree. This sometimes confuses new people, as arguably "git add" is told to record the current state of "subdir/" as a whole, not the current state of the paths that exist in the working tree that matches that pathspec (the latter by definition excludes the state of "subdir/z" because it does not exist in the working tree). Plan to eventually make "git add" pretend as if "-A" is given when there is a pathspec on the command line. When resolving a conflict to remove a path, the current code tells you to "git rm $path", but with such a change, you will be able to say "git add $path" (of course you can do "git add -A $path" today). That means that we can simplify the advice messages given by "git status". That all will be in Git 2.0 or later, if we are going to do so. For that transition to work, people need to learn either to say "git add --no-all subdir/" when they want to ignore the removed paths like "subdir/z", or to say "git add -A subdir/" when they want to take the state of the directory as a whole. "git add" without any argument will continue to be a no-op. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-08builtin/add.c: simplify boolean variablesLibravatar Junio C Hamano1-11/+11
Do not to explicitly initialize static variables to 0 and instead let BSS take care of it. Also use OPT_BOOL() to let the command line arguments set these variables to 0 or 1, instead of the deprecated OPT_BOOLEAN() aka OPT_COUNTUP(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-07add: Clarify documentation of -A and -uLibravatar Greg Price1-10/+12
The documentation of '-A' and '-u' is very confusing for someone who doesn't already know what they do. Describe them with fewer words and clearer parallelism to each other and to the behavior of plain 'add'. Also mention the default <pathspec> for '-A' as well as '-u', because it applies to both. Signed-off-by: Greg Price <price@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-04Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano1-636/+821
* git://github.com/git-l10n/git-po: l10n: de.po: correct translation of "bisect" messages l10n: de.po: translate 5 new messages l10n: de.po: translate 35 new messages
2013-03-03Git 1.8.2-rc2Libravatar Junio C Hamano2-5/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-01Sync with 1.8.1.5Libravatar Junio C Hamano5-6/+16
2013-03-01Git 1.8.1.5Libravatar Junio C Hamano3-2/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-01Make !pattern in .gitattributes non-fatalLibravatar Thomas Rast2-4/+7
Before 82dce99 (attr: more matching optimizations from .gitignore, 2012-10-15), .gitattributes did not have any special treatment of a leading '!'. The docs, however, always said The rules how the pattern matches paths are the same as in `.gitignore` files; see linkgit:gitignore[5]. By those rules, leading '!' means pattern negation. So 82dce99 correctly determined that this kind of line makes no sense and should be disallowed. However, users who actually had a rule for files starting with a '!' are in a bad position: before 82dce99 '!' matched that literal character, so it is conceivable that users have .gitattributes with such lines in them. After 82dce99 the unescaped version was disallowed in such a way that git outright refuses to run(!) most commands in the presence of such a .gitattributes. It therefore becomes very hard to fix, let alone work with, such repositories. Let's at least allow the users to fix their repos: change the fatal error into a warning. Reported-by: mathstuf@gmail.com Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-01Merge branch 'wk/user-manual' into maintLibravatar Junio C Hamano1-56/+77
* wk/user-manual: user-manual: Flesh out uncommitted changes and submodule updates user-manual: Use request-pull to generate "please pull" text user-manual: Reorganize the reroll sections, adding 'git rebase -i'
2013-03-01Documentation/githooks: Fix linkgitLibravatar Andrew Wong1-1/+1
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-27Merge branch 'maint'Libravatar Junio C Hamano2-3/+8
* maint: Update draft release notes to 1.8.1.5 Documentation/submodule: Add --force to update synopsis
2013-02-27Update draft release notes to 1.8.1.5Libravatar Junio C Hamano1-1/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-27Merge branch 'ef/non-ascii-parse-options-error-diag' into maintLibravatar Junio C Hamano1-1/+4
* ef/non-ascii-parse-options-error-diag: parse-options: report uncorrupted multi-byte options
2013-02-27Merge branch 'wk/man-deny-current-branch-is-default-these-days' into maintLibravatar Junio C Hamano1-3/+4
* wk/man-deny-current-branch-is-default-these-days: user-manual: typofix (ofthe->of the) user-manual: Update for receive.denyCurrentBranch=refuse
2013-02-27Merge branch 'jn/less-reconfigure' into maintLibravatar Junio C Hamano1-6/+8
* jn/less-reconfigure: Makefile: avoid infinite loop on configure.ac change
2013-02-27Merge branch 'mh/maint-ceil-absolute'Libravatar Junio C Hamano3-16/+52
An earlier workaround designed to help people who list logical directories that will not match what getcwd(3) returns in the GIT_CEILING_DIRECTORIES had an adverse effect when it is slow to stat and readlink a directory component of an element listed on it. * mh/maint-ceil-absolute: Provide a mechanism to turn off symlink resolution in ceiling paths
2013-02-27Documentation/submodule: Add --force to update synopsisLibravatar Brad King1-1/+1
In commit 9db31bdf (submodule: Add --force option for git submodule update, 2011-04-01) we added the option to the implementation's usage synopsis but forgot to add it to the synopsis in the command documentation. Add the option to the synopsis in the same location it is reported in usage and re-wrap the options to avoid long lines. Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-26Merge branch 'for-junio' of git://github.com/kusma/gitLibravatar Junio C Hamano1-131/+75
* 'for-junio' of git://github.com/kusma/git: wincred: improve compatibility with windows versions wincred: accept CRLF on stdin to simplify console usage
2013-02-26Revert "compat: add strtok_r()"Libravatar Erik Faye-Lund5-80/+0
This reverts commit 78457bc0ccc1af8b9eb776a0b17986ebd50442bc. commit 28c5d9e ("vcs-svn: drop string_pool") previously removed the only call-site for strtok_r. So let's get rid of the compat implementation as well. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-26wincred: improve compatibility with windows versionsLibravatar Karsten Blees1-129/+70
On WinXP, the windows credential helper doesn't work at all (due to missing Cred[Un]PackAuthenticationBuffer APIs). On Win7, the credential format used by wincred is incompatible with native Windows tools (such as the control panel applet or 'cmdkey.exe /generic'). These Windows tools only set the TargetName, UserName and CredentialBlob members of the CREDENTIAL structure (where CredentialBlob is the UTF-16-encoded password). Remove the unnecessary packing / unpacking of the password, along with the related API definitions, for compatibility with Windows XP. Don't use CREDENTIAL_ATTRIBUTEs to identify credentials for compatibility with Windows credential manager tools. Parse the protocol, username, host and path fields from the credential's target name instead. Credentials created with an old wincred version will have mangled or empty passwords after this change. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
2013-02-26wincred: accept CRLF on stdin to simplify console usageLibravatar Karsten Blees1-2/+5
The windows credential helper currently only accepts LF on stdin, but bash and cmd.exe both send CRLF. This prevents interactive use in the console. Change the stdin parser to optionally accept CRLF. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
2013-02-26l10n: de.po: correct translation of "bisect" messagesLibravatar Ralf Thielow1-9/+9
The term "bisect" was translated as "halbieren", we should translate it as "binäre Suche" (binary search). While at there, we should leave "bisect run" untranslated since it's a subcommand of "git bisect". Suggested-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2013-02-26l10n: de.po: translate 5 new messagesLibravatar Ralf Thielow1-109/+145
Translate 5 new messages came from git.pot update in 235537a (l10n: git.pot: v1.8.2 round 3 (5 new)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Thomas Rast <trast@inf.ethz.ch>
2013-02-26l10n: de.po: translate 35 new messagesLibravatar Ralf Thielow1-618/+767
Translate 35 new messages came from git.pot update in 9caaf23 (l10n: Update git.pot (35 new, 14 removed messages)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Thomas Rast <trast@inf.ethz.ch>
2013-02-25Git 1.8.2-rc1Libravatar Junio C Hamano2-14/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25Merge git://github.com/git-l10n/git-poLibravatar Junio C Hamano4-948/+1200
* git://github.com/git-l10n/git-po: l10n: vi.po: Updated 5 new messages (2009t0f0u) l10n: Update Swedish translation (2009t0f0u) l10n: Update Swedish translation (2004t0f0u) l10n: zh_CN.po: translate 5 new messages l10n: git.pot: v1.8.2 round 3 (5 new)
2013-02-25Sync with 'maint'Libravatar Junio C Hamano3-2/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25Merge branch 'wk/user-manual'Libravatar Junio C Hamano1-56/+77
Further updates to the user manual. * wk/user-manual: user-manual: Flesh out uncommitted changes and submodule updates user-manual: Use request-pull to generate "please pull" text user-manual: Reorganize the reroll sections, adding 'git rebase -i'
2013-02-25Merge branch 'jn/less-reconfigure'Libravatar Junio C Hamano1-6/+8
A change made on v1.8.1.x maintenance track had a nasty regression to break the build when autoconf is used. * jn/less-reconfigure: Makefile: avoid infinite loop on configure.ac change
2013-02-25Merge branch 'as/check-ignore'Libravatar Junio C Hamano3-3/+18
"git check-ignore ." segfaulted, as a function it calls deep in its callchain took a string in the <ptr, length> form but did not stop when given an empty string. * as/check-ignore: name-hash: allow hashing an empty string t0008: document test_expect_success_multi
2013-02-25Merge branch 'ct/autoconf-htmldir'Libravatar Junio C Hamano1-0/+2
An earlier change to config.mak.autogen broke a build driven by the ./configure script when --htmldir is not specified on the command line of ./configure. * ct/autoconf-htmldir: Bugfix: undefined htmldir in config.mak.autogen
2013-02-25Merge branch 'wk/man-deny-current-branch-is-default-these-days'Libravatar Junio C Hamano1-1/+1
* wk/man-deny-current-branch-is-default-these-days: user-manual: typofix (ofthe->of the)
2013-02-25Prepare for 1.8.1.5Libravatar Junio C Hamano2-1/+38
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-25Merge branch 'jc/mention-tracking-for-pull-default' into maintLibravatar Junio C Hamano1-1/+2
* jc/mention-tracking-for-pull-default: doc: mention tracking for pull.default
2013-02-25Merge branch 'mm/config-intro-in-git-doc' into maintLibravatar Junio C Hamano1-6/+5
* mm/config-intro-in-git-doc: git.txt: update description of the configuration mechanism
2013-02-25Merge branch 'da/p4merge-mktemp-fix' into maintLibravatar Junio C Hamano1-1/+1
* da/p4merge-mktemp-fix: p4merge: fix printf usage
2013-02-25Merge branch 'bw/get-tz-offset-perl' into maintLibravatar Junio C Hamano4-13/+35
* bw/get-tz-offset-perl: cvsimport: format commit timestamp ourselves without using strftime perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases Move Git::SVN::get_tz to Git::get_tz_offset
2013-02-25Merge branch 'al/mergetool-printf-fix' into maintLibravatar Junio C Hamano2-2/+2
* al/mergetool-printf-fix: difftool--helper: fix printf usage git-mergetool: print filename when it contains %
2013-02-25Merge branch 'jx/utf8-printf-width' into maintLibravatar Junio C Hamano3-2/+25
* jx/utf8-printf-width: Add utf8_fprintf helper that returns correct number of columns
2013-02-25Merge branch 'mg/bisect-doc' into maintLibravatar Junio C Hamano1-1/+6
* mg/bisect-doc: git-bisect.txt: clarify that reset quits bisect
2013-02-25Merge branch 'sp/smart-http-content-type-check' into maintLibravatar Junio C Hamano8-17/+59
* sp/smart-http-content-type-check: http_request: reset "type" strbuf before adding t5551: fix expected error output Verify Content-Type from smart HTTP servers
2013-02-25Merge branch 'jc/combine-diff-many-parents' into maintLibravatar Junio C Hamano2-14/+31
* jc/combine-diff-many-parents: t4038: add tests for "diff --cc --raw <trees>" combine-diff: lift 32-way limit of combined diff
2013-02-25Merge branch 'jk/apply-similaritly-parsing' into maintLibravatar Junio C Hamano1-4/+6
* jk/apply-similaritly-parsing: builtin/apply: tighten (dis)similarity index parsing
2013-02-25Merge branch 'jk/remote-helpers-doc' into maintLibravatar Junio C Hamano5-7/+23
* jk/remote-helpers-doc: Rename {git- => git}remote-helpers.txt
2013-02-25Merge branch 'ab/gitweb-use-same-scheme' into maintLibravatar Junio C Hamano1-2/+2
* ab/gitweb-use-same-scheme: gitweb: refer to picon/gravatar images over the same scheme
2013-02-25Merge branch 'zk/clean-report-failure' into maintLibravatar Junio C Hamano1-29/+125
* zk/clean-report-failure: git-clean: Display more accurate delete messages
2013-02-25Merge branch 'nd/clone-no-separate-git-dir-with-bare' into maintLibravatar Junio C Hamano1-0/+2
* nd/clone-no-separate-git-dir-with-bare: clone: forbid --bare --separate-git-dir <dir>
2013-02-25Merge branch 'da/p4merge-mktemp' into maintLibravatar Junio C Hamano1-14/+13
* da/p4merge-mktemp: mergetools/p4merge: Honor $TMPDIR for the /dev/null placeholder