* What's cooking in git.git (Jul 2013, #04; Thu, 11)
@ 2013-07-11 23:36 Junio C Hamano
2013-09-29 12:08 ` [PATCH] Makefile: suppress false positive warnings of empty format string Stefan Beller
0 siblings, 1 reply; 10+ messages in thread
From: Junio C Hamano @ 2013-07-11 23:36 UTC (permalink / raw
To: git
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
You can find the changes described here in the integration branches
of the repositories listed at
http://git-blame.blogspot.com/p/git-public-repositories.html
--------------------------------------------------
[Graduated to "master"]
* af/rebase-i-merge-options (2013-07-02) 1 commit
(merged to 'next' on 2013-07-08 at f411975)
+ Do not ignore merge options in interactive rebase
"git rebase -i" now honors --strategy and -X options.
* jc/maint-diff-core-safecrlf (2013-06-25) 1 commit
(merged to 'next' on 2013-07-03 at db8a2a6)
+ diff: demote core.safecrlf=true to core.safecrlf=warn
"git diff" refused to even show difference when core.safecrlf is
set to true (i.e. error out) and there are offending lines in the
working tree files.
* jc/t1512-fix (2013-07-01) 2 commits
(merged to 'next' on 2013-07-09 at a6c62bb)
+ get_short_sha1(): correctly disambiguate type-limited abbreviation
+ t1512: correct leftover constants from earlier edition
A test that should have failed but didn't revealed a bug that needs
to be corrected.
* jc/triangle-push-fixup (2013-06-24) 5 commits
(merged to 'next' on 2013-06-26 at 73cbb69)
+ 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
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.
* jg/status-config (2013-06-24) 4 commits
(merged to 'next' on 2013-07-03 at 6ac1ada)
+ 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
"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).
The bottom two has been graduated to 'master' but then reverted.
The tip two are quick attempts to fix the fallout. The one for
status.short looks correct; the other one, while it is correct,
is unfortunately overly complex in order not to introduce an
unnecessary regression.
* jk/bash-completion (2013-06-30) 2 commits
(merged to 'next' on 2013-07-01 at 6daca44)
+ completion: learn about --man-path
+ completion: handle unstuck form of base git options
* mh/maint-lockfile-overflow (2013-07-07) 1 commit
(merged to 'next' on 2013-07-09 at e1a0eac)
+ lockfile: fix buffer overflow in path handling
Will merge later to 'maint'.
* pb/stash-refuse-to-kill (2013-07-01) 2 commits
(merged to 'next' on 2013-07-05 at 78ecc59)
+ git stash: avoid data loss when "git stash save" kills a directory
+ treat_directory(): do not declare submodules to be untracked
"git stash save" is not just about "saving" the local changes, but
also is to restore the working tree state to that of HEAD. If you
changed a non-directory into a directory in the local change, you
may have untracked files in that directory, which have to be killed
while doing so, unless you run it with --include-untracked. Teach
the command to detect and error out before spreading the damage.
This needed a small fix to "ls-files --killed".
* rr/rebase-checkout-reflog (2013-06-17) 5 commits
(merged to 'next' on 2013-07-01 at 27cfd27)
+ checkout: respect GIT_REFLOG_ACTION
(merged to 'next' on 2013-06-27 at 4d99efa)
+ 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
(this branch is used by rr/rebase-reflog-message-reword.)
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.
The "bugfix" bits of the series is here. The follow-up part to
reword reflog messages for steps in "rebase" are split to another
topic.
* tr/test-v-and-v-subtest-only (2013-07-08) 1 commit
(merged to 'next' on 2013-07-08 at 933d477)
+ t0000: do not use export X=Y
Finishing touches to a topics that is already in master for the
upcoming release.
--------------------------------------------------
[New Topics]
* jk/gcc-function-attributes (2013-07-09) 2 commits
- use "sentinel" function attribute for variadic lists
- add missing "format" function attributes
(this branch is used by jk/gcc-function-attributes-more.)
Use the function attributes extension to catch mistakes in use of
our own variadic functions that use NULL sentinel at the end
(i.e. like execl(3)) and format strings (i.e. like printf(3)).
Will merge to 'next'.
* jk/gcc-function-attributes-more (2013-07-09) 2 commits
. (squash???) workaround empty format string warning which we agreed is silly
. wt-status: use "format" function attribute for status_printf
(this branch uses jk/gcc-function-attributes.)
The continuation of jk/gcc-function-attributes, but the code
involved uses an equivalent of printf(""), which triggers an
warning.
I am inclined to remove the "fixup" workaround at the tip that
turns them into a silly equivalent of printf("%s", "") and tell
users who use -Werror to also use -Wno-format-zero-length.
* km/http-curl-config-per-url (2013-07-11) 1 commit
- config: add support for http.<url>.* settings
Allows custom curl configuration per URL when talking over http.
Partial matching code was hard to grok, and requested for
code clarification.
--------------------------------------------------
[Stalled]
* rr/send-email-ssl-verify (2013-07-06) 6 commits
- SQUASH??? update to support SSL_ca_file as well as SSL_ca_path
- SQUASH??? send-email: cover both smtps and starttls cases
- fixup! send-email: squelch warning from Net::SMTP::SSL
- SQUASH??? send-email giving default value to ssl-cert-path with ||= assignment
- send-email: introduce sendemail.smtpsslcertpath
- send-email: squelch warning from Net::SMTP::SSL
The issue seems a lot deeper than the initial attempt and needs
somebody to sit down and sort out to get the version dependencies
and lazy loading right.
* rj/read-default-config-in-show-ref-pack-refs (2013-06-17) 3 commits
- ### DONTMERGE: needs better explanation on what config they need
- pack-refs.c: Add missing call to git_config()
- show-ref.c: Add missing call to git_config()
The changes themselves are probably good, but it is unclear what
basic setting needs to be read for which exact operation.
Waiting for clarification.
$gmane/228294
* jh/shorten-refname (2013-05-07) 4 commits
- t1514: refname shortening is done after dereferencing symbolic refs
- shorten_unambiguous_ref(): Fix shortening refs/remotes/origin/HEAD to origin
- t1514: Demonstrate failure to correctly shorten "refs/remotes/origin/HEAD"
- t1514: Add tests of shortening refnames in strict/loose mode
When remotes/origin/HEAD is not a symbolic ref, "rev-parse
--abbrev-ref remotes/origin/HEAD" ought to show "origin", not
"origin/HEAD", which is fixed with this series (if it is a symbolic
ref that points at remotes/origin/something, then it should show
"origin/something" and it already does).
Expecting a reroll, as an early part of a larger series.
$gmane/225137
* jl/submodule-mv (2013-04-23) 5 commits
- submodule.c: duplicate real_path's return value
- rm: delete .gitmodules entry of submodules removed from the work tree
- Teach mv to update the path entry in .gitmodules for moved submodules
- Teach mv to move submodules using a gitfile
- Teach mv to move submodules together with their work trees
"git mv A B" when moving a submodule A does "the right thing",
inclusing relocating its working tree and adjusting the paths in
the .gitmodules file.
Waiting for a reroll.
$gmane/226294
* jk/list-objects-sans-blobs (2013-06-06) 4 commits
. archive: ignore blob objects when checking reachability
. list-objects: optimize "revs->blob_objects = 0" case
. upload-archive: restrict remote objects with reachability check
. clear parsed flag when we free tree buffers
Attempt to allow "archive --remote=$there $arbitrary_sha1" while
keeping the reachability safety.
Seems to break some tests in a trivial and obvious way.
* mg/more-textconv (2013-05-10) 7 commits
- grep: honor --textconv for the case rev:path
- grep: allow to use textconv filters
- t7008: demonstrate behavior of grep with textconv
- cat-file: do not die on --textconv without textconv filters
- show: honor --textconv for blobs
- diff_opt: track whether flags have been set explicitly
- t4030: demonstrate behavior of show with textconv
Make "git grep" and "git show" pay attention to --textconv when
dealing with blob objects.
I thought this was pretty well designed and executed, but it seems
there are some doubts on the list; kicked back to 'pu'.
* mh/multimail (2013-04-21) 1 commit
- git-multimail: a replacement for post-receive-email
Waiting for the initial history to pull from.
$gmane/223564
* jc/format-patch (2013-04-22) 2 commits
- format-patch: --inline-single
- format-patch: rename "no_inline" field
A new option to send a single patch to the standard output to be
appended at the bottom of a message. I personally have no need for
this, but it was easy enough to cobble together. Tests, docs and
stripping out more MIMEy stuff are left as exercises to interested
parties.
Not ready for inclusion.
Will discard unless we hear from anybody who is interested in
tying its loose ends.
* jk/gitweb-utf8 (2013-04-08) 4 commits
- gitweb: Fix broken blob action parameters on blob/commitdiff pages
- gitweb: Don't append ';js=(0|1)' to external links
- gitweb: Make feed title valid utf8
- gitweb: Fix utf8 encoding for blob_plain, blobdiff_plain, commitdiff_plain, and patch
Various fixes to gitweb.
Drew Northup volunteered to take a look into this.
$gmane/226216
* jc/show-branch (2013-06-07) 5 commits
- show-branch: use commit slab to represent bitflags of arbitrary width
- show-branch.c: remove "all_mask"
- show-branch.c: abstract out "flags" operation
- show-branch.c: lift all_mask/all_revs to a global static
- show-branch.c: update comment style
Waiting for the final step to lift the hard-limit before sending it out.
--------------------------------------------------
[Cooking]
* hv/config-from-blob (2013-07-11) 5 commits
- do not die when error in config parsing of buf occurs
- teach config --blob option to parse config from database
- config: make parsing stack struct independent from actual data source
- config: drop cf validity check in get_next_char()
- config: factor out config file stack management
Rerolled.
* bc/push-match-many-refs (2013-07-08) 1 commit
(merged to 'next' on 2013-07-11 at df4d56d)
+ remote.c: avoid O(m*n) behavior in match_push_refs
Pushing to repositories with many refs employed O(m*n) algorithm
where n is the number of refs on the receiving end.
Will merge to 'master'.
* ft/diff-rename-default-score-is-half (2013-07-05) 1 commit
(merged to 'next' on 2013-07-09 at 6a6b57e)
+ diff-options: document default similarity index
Will merge to 'master'.
* jc/name-rev-exact-ref (2013-07-09) 3 commits
(merged to 'next' on 2013-07-11 at fd5b30c)
+ describe: use argv-array
+ name-rev: allow converting the exact object name at the tip of a ref
+ name-ref: factor out name shortening logic from name_ref()
Corrects the longstanding sloppiness in the implementation of
name-rev that conflated "we take commit-ish" and "differences
between tags and commits do not matter".
Will merge to 'master'.
* jk/in-pack-size-measurement (2013-07-11) 10 commits
- 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
Allow on-disk footprint of objects in packfiles (often they are a
lot smaller than their true size, when expressed as deltas).
Will merge to 'next'.
* jk/maint-clone-shared-no-connectivity-validation (2013-07-08) 1 commit
(merged to 'next' on 2013-07-11 at 8183412)
+ clone: drop connectivity check for local clones
(this branch is used by jk/clone-shared-no-connectivity-validation.)
"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.
Will merge to 'master'.
* jk/maint-config-multi-order (2013-07-07) 1 commit
(merged to 'next' on 2013-07-09 at 0db1db9)
+ git-config(1): clarify precedence of multiple values
Will merge to 'master'.
* jk/pull-to-integrate (2013-07-08) 2 commits
(merged to 'next' on 2013-07-09 at 2ecac24)
+ pull: change the description to "integrate" changes
+ push: avoid suggesting "merging" remote changes
Will merge to 'master'.
* km/svn-1.8-serf-only (2013-07-07) 2 commits
- git-svn: allow git-svn fetching to work using serf
- Git.pm: add new temp_is_locked function
Subversion 1.8.0 that was recently released breaks older subversion
clients coming over http/https in various ways.
Will merge to 'next'.
* rr/name-rev-stdin-doc (2013-07-07) 1 commit
(merged to 'next' on 2013-07-09 at 7cfbff6)
+ name-rev doc: rewrite --stdin paragraph
Will merge to 'master'.
* rs/pickaxe-simplify (2013-07-07) 1 commit
(merged to 'next' on 2013-07-11 at c5972f7)
+ diffcore-pickaxe: simplify has_changes and contains
Will merge to 'master'.
* tr/merge-recursive-index-only (2013-07-07) 3 commits
- merge-recursive: -Xindex-only to leave worktree unchanged
- merge-recursive: untangle double meaning of o->call_depth
- merge-recursive: remove dead conditional in update_stages()
* tr/test-lint-no-export-assignment-in-shell (2013-07-08) 2 commits
(merged to 'next' on 2013-07-09 at 6f10ea2)
+ test-lint: detect 'export FOO=bar'
+ t9902: fix 'test A == B' to use = operator
Will merge to 'master'.
* es/overlapping-range-set (2013-07-09) 2 commits
(merged to 'next' on 2013-07-11 at 3df5a94)
+ range_set: fix coalescing bug when range is a subset of another
+ t4211: fix broken test when one -L range is subset of another
Will merge to 'master'.
* jc/push-cas (2013-07-11) 6 commits
- t5533: test "push --lockref"
- push --lockref: tie it all together
- push --lockref: implement logic to populate old_sha1_expect[]
- remote.c: add command line option parser for "--lockref"
- builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN
- cache.h: move remote/connect API out of it
Allow a safer "rewind of the remote tip" push than blind "--force",
by requiring that the overwritten remote ref to be unchanged since
the new history to replace it was prepared.
The machinery is more or less ready. The "--force" option is again
the big red button to override any safety, thanks to J6t's sanity
(the original round allowed --lockref to defeat --force).
Waiting for comments.
* jc/remote-http-argv-array (2013-07-09) 1 commit
(merged to 'next' on 2013-07-11 at 7fbe8bd)
+ remote-http: use argv-array
Will merge to 'master'.
* nd/const-struct-cache-entry (2013-07-09) 1 commit
- Convert "struct cache_entry *" to "const ..." wherever possible
Will merge to 'next'.
* jk/fetch-pack-many-refs (2013-07-02) 3 commits
(merged to 'next' on 2013-07-09 at a53b7c7)
+ fetch-pack: avoid quadratic behavior in rev_list_push
+ commit.c: make compare_commits_by_commit_date global
+ fetch-pack: avoid quadratic list insertion in mark_complete
Fetching between repositories with many refs employed O(n^2)
algorithm to match up the common objects, which has been corrected.
Will merge to 'master'.
* jk/format-patch-from (2013-07-03) 2 commits
(merged to 'next' on 2013-07-09 at 6ed86d5)
+ teach format-patch to place other authors into in-body "From"
+ pretty.c: drop const-ness from pretty_print_context
"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.
Will merge to 'master'.
* ms/remote-tracking-branches-in-doc (2013-07-03) 1 commit
(merged to 'next' on 2013-07-09 at 411a8bd)
+ Change "remote tracking" to "remote-tracking"
Will merge to 'master'.
* tf/gitweb-extra-breadcrumbs (2013-07-04) 1 commit
(merged to 'next' on 2013-07-09 at 525331b)
+ gitweb: allow extra breadcrumbs to prefix the trail
An Gitweb installation that is a part of larger site can optionally
show extra links that point at the levels higher than the Gitweb
pages itself in the link hierarchy of pages.
Will merge to 'master'.
* bc/commit-invalid-utf8 (2013-07-09) 3 commits
(merged to 'next' on 2013-07-11 at a2ee572)
+ commit: reject non-characters
+ commit: reject overlong UTF-8 sequences
+ commit: reject invalid UTF-8 codepoints
Tighten up autodetection of UTF-8 encoded strings.
Will merge to 'master'.
* bc/send-email-use-port-as-separate-param (2013-07-04) 1 commit
(merged to 'next' on 2013-07-09 at a569eb5)
+ send-email: provide port separately from hostname
Will merge to 'master'.
* ml/cygwin-does-not-have-fifo (2013-07-05) 1 commit
(merged to 'next' on 2013-07-09 at 7d6849d)
+ test-lib.sh - cygwin does not have usable FIFOs
Will merge to 'master'.
* es/contacts (2013-07-03) 3 commits
- contrib: contacts: interpret committish akin to format-patch
- contrib: contacts: add ability to parse from committish
- contrib: add git-contacts helper
A helper to read from a set of format-patch output files or a range
of commits and find those who may have insights to the code that
the changes touch by running a series of "git blame" commands.
Still needs to add mailmap support and other niceties but the
basics already look sound, and the enhancements can be done
in-tree. Assuming that "git contact" is something we may want to
have as a member of the official set of commands someday, that is.
Will merge to 'next'.
* cp/submodule-custom-update (2013-07-03) 1 commit
(merged to 'next' on 2013-07-09 at 3d27516)
+ submodule update: allow custom command to update submodule working tree
In addition to the choice from "rebase, merge, or checkout-detach",
allow a custom command to be used in "submodule update" to update
the working tree of submodules.
Will merge to 'master'.
* mv/merge-ff-tristate (2013-07-02) 1 commit
(merged to 'next' on 2013-07-09 at c32b95d)
+ merge: handle --ff/--no-ff/--ff-only as a tri-state option
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.
Will merge to 'master'.
* rr/rebase-reflog-message-reword (2013-06-23) 2 commits
(merged to 'next' on 2013-07-11 at 59921e0)
+ rebase -i: use a better reflog message
+ rebase: use a better reflog message
"git rebase [-i]" used to leave just "rebase" as its reflog message
for some operations. This rewords them to be more informative.
Will merge to 'master'.
* bp/mediawiki-preview (2013-07-08) 7 commits
- git-remote-mediawiki: add preview subcommand into git mw
- git-remote-mediawiki: add git-mw command
- git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki
- git-remote-mediawiki: update tests to run with the new bin-wrapper
- git-remote-mediawiki: add a git bin-wrapper for developement
- wrap-for-bin: make bin-wrappers chainable
- git-remote-mediawiki: introduction of Git::Mediawiki.pm
Add a command to allow previewing the contents locally before
pushing it out, when working with a MediaWiki remote.
I personally do not think this belongs to Git. If you are working
on a set of AsciiDoc source files, you sure do want to locally
format to preview what you will be pushing out, and if you are
working on a set of C or Java source files, you do want to test it
before pushing it out, too. That kind of thing belongs to your
build script, not to your SCM.
But I'll let it pass, as this is only a contrib/ thing.
Will merge to 'next'.
* fg/submodule-clone-depth (2013-07-03) 1 commit
(merged to 'next' on 2013-07-09 at ab156f3)
+ Add --depth to submodule update/add
Allow shallow-cloning of submodules with "git submodule update".
Will merge to 'master'.
* jc/pull-training-wheel (2013-06-27) 1 commit
- pull: require choice between rebase/merge on non-fast-forward pull
Make "git pull" refuse with "it does not fast forward; choose between
'pull --merge' and 'pull --rebase'".
John Keeping seems to want to restrict this to "git pull" without
any other argument. I personally do not have a strong opinion
either way, but I'm inclined to take such a patch to loosen the new
logic with other people's support. Hint, hint...
* as/log-output-encoding-in-user-format (2013-07-05) 11 commits
(merged to 'next' on 2013-07-08 at 2e1bdd9)
+ 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
(merged to 'next' on 2013-07-05 at d2c99e5)
+ t4041, t4205, t6006, t7102: use iso8859-1 rather than iso-8859-1
(merged to 'next' on 2013-07-01 at 3318aa8)
+ t4205: replace .\+ with ..* in sed commands
(merged to 'next' on 2013-06-28 at 4063330)
+ 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
"log --format=" did not honor i18n.logoutputencoding configuration
and this attempts to fix it.
Will merge to 'master'.
* jk/fast-import-empty-ls (2013-06-23) 4 commits
- fast-import: allow moving the root tree
- fast-import: allow ls or filecopy of the root tree
- fast-import: set valid mode on root tree in "ls"
- t9300: document fast-import empty path issues
Waiting for reviews.
$gmane/228741
* rj/cygwin-clarify-use-of-cheating-lstat (2013-07-11) 1 commit
- cygwin: Add fast_lstat() and fast_fstat() functions
Turns quite a many uses of lstat() into fast_lstat() to mark
callsites that allow "a faster but cheating and incorrect variant".
Defining fast_lstat() to be the same as lstat(), is fine from
correctness point of view, but it can be replaced with an
alternative implementation that more quickly grabs only the part of
the stat information that matter (e.g. cygwin). The places where
we _do_ require a fully correct lstat() are left as lstat().
The damage this patch makes to the the core codepath on systems may
be rather large from readability's point of view, though.
* jc/reflog-doc (2013-06-19) 1 commit
- setup_reflog_action: document the rules for using GIT_REFLOG_ACTION
Document rules to use GIT_REFLOG_ACTION variable in the scripted
Porcelain. git-rebase--interactive locally violates this, but it
is a leaf user that does not call out to or dot-sources other
scripts, so fixing it is not all that urgent.
* mh/ref-races-optim-invalidate-cached (2013-06-20) 1 commit
- refs: do not invalidate the packed-refs cache unnecessarily
This requires the platform lstat() to be correct to avoid false
negatives.
* jx/clean-interactive (2013-06-26) 16 commits
- test: run testcases with POSIX absolute paths on Windows
- test: add t7301 for git-clean--interactive
- git-clean: add documentation for interactive git-clean
- git-clean: add ask each interactive action
- git-clean: add select by numbers interactive action
- git-clean: add filter by pattern interactive action
- git-clean: use a git-add-interactive compatible UI
- git-clean: add colors to interactive git-clean
- git-clean: show items of del_list in columns
- git-clean: add support for -i/--interactive
(merged to 'next' on 2013-06-26 at f7be2d8)
+ git-clean: refactor git-clean into two phases
+ write_name{_quoted_relative,}(): remove redundant parameters
+ quote_path_relative(): remove redundant parameter
+ quote.c: substitute path_relative with relative_path
+ path.c: refactor relative_path(), not only strip prefix
+ test: add test cases for relative_path
Add "interactive" mode to "git clean".
The early part to refactor relative path related helper functions
looked sensible.
Will merge to 'next'.
* jn/add-2.0-u-A-sans-pathspec (2013-04-26) 1 commit
- git add: -u/-A now affects the entire working tree
Will cook in 'next' until Git 2.0.
* jc/core-checkstat-2.0 (2013-05-06) 1 commit
- core.statinfo: remove as promised in Git 2.0
Will cook in 'next' until Git 2.0.
* jc/push-2.0-default-to-simple (2013-06-18) 1 commit
- push: switch default from "matching" to "simple"
Will cook in 'next' until Git 2.0.
* jc/add-2.0-ignore-removal (2013-04-22) 1 commit
- git add <pathspec>... defaults to "-A"
Updated endgame for "git add <pathspec>" that defaults to "--all"
aka "--no-ignore-removal".
Will cook in 'next' until Git 2.0.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-07-11 23:36 What's cooking in git.git (Jul 2013, #04; Thu, 11) Junio C Hamano
@ 2013-09-29 12:08 ` Stefan Beller
2013-09-29 15:07 ` Felipe Contreras
2013-09-29 19:00 ` Jonathan Nieder
0 siblings, 2 replies; 10+ messages in thread
From: Stefan Beller @ 2013-09-29 12:08 UTC (permalink / raw
To: git, gitster, jrnieder; +Cc: Stefan Beller
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index de3d72c..60afa51 100644
--- a/Makefile
+++ b/Makefile
@@ -349,7 +349,7 @@ GIT-VERSION-FILE: FORCE
# CFLAGS and LDFLAGS are for the users to override from the command line.
-CFLAGS = -g -O2 -Wall
+CFLAGS = -g -O2 -Wall -Wno-format-zero-length
LDFLAGS =
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
--
1.8.4.474.g128a96c
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-29 12:08 ` [PATCH] Makefile: suppress false positive warnings of empty format string Stefan Beller
@ 2013-09-29 15:07 ` Felipe Contreras
2013-09-29 15:23 ` Ramsay Jones
2013-09-29 19:00 ` Jonathan Nieder
1 sibling, 1 reply; 10+ messages in thread
From: Felipe Contreras @ 2013-09-29 15:07 UTC (permalink / raw
To: Stefan Beller; +Cc: git, Junio C Hamano, Jonathan Nieder
On Sun, Sep 29, 2013 at 7:08 AM, Stefan Beller
<stefanbeller@googlemail.com> wrote:
> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index de3d72c..60afa51 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -349,7 +349,7 @@ GIT-VERSION-FILE: FORCE
>
> # CFLAGS and LDFLAGS are for the users to override from the command line.
>
> -CFLAGS = -g -O2 -Wall
> +CFLAGS = -g -O2 -Wall -Wno-format-zero-length
Oh yes please.
However, somebody mentioned that this might break compilers other than
gcc, but perhaps we can do what Linux does:
cc-disable-warning = $(call try-run,\
$(CC) $(CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
CFLAGS = -g -O2 -Wall $(call cc-disable-warning,format-zero-length,)
--
Felipe Contreras
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-29 15:07 ` Felipe Contreras
@ 2013-09-29 15:23 ` Ramsay Jones
0 siblings, 0 replies; 10+ messages in thread
From: Ramsay Jones @ 2013-09-29 15:23 UTC (permalink / raw
To: Felipe Contreras, Stefan Beller; +Cc: git, Junio C Hamano, Jonathan Nieder
On 29/09/13 16:07, Felipe Contreras wrote:
> On Sun, Sep 29, 2013 at 7:08 AM, Stefan Beller
> <stefanbeller@googlemail.com> wrote:
>> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
>> ---
>> Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index de3d72c..60afa51 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -349,7 +349,7 @@ GIT-VERSION-FILE: FORCE
>>
>> # CFLAGS and LDFLAGS are for the users to override from the command line.
>>
>> -CFLAGS = -g -O2 -Wall
>> +CFLAGS = -g -O2 -Wall -Wno-format-zero-length
>
> Oh yes please.
>
> However, somebody mentioned that this might break compilers other than
> gcc, but perhaps we can do what Linux does:
I simply added:
CFLAGS+=-Wno-format-zero-length
to my config.mak file. I had originally intended to do so conditionally,
depending on the compiler being gcc, but I found that clang and tcc just
ignored it ...
> cc-disable-warning = $(call try-run,\
> $(CC) $(CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
>
> CFLAGS = -g -O2 -Wall $(call cc-disable-warning,format-zero-length,)
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-29 12:08 ` [PATCH] Makefile: suppress false positive warnings of empty format string Stefan Beller
2013-09-29 15:07 ` Felipe Contreras
@ 2013-09-29 19:00 ` Jonathan Nieder
2013-09-30 20:14 ` Jeff King
1 sibling, 1 reply; 10+ messages in thread
From: Jonathan Nieder @ 2013-09-29 19:00 UTC (permalink / raw
To: Stefan Beller; +Cc: git, gitster
Hi,
Stefan Beller wrote:
> --- a/Makefile
> +++ b/Makefile
> @@ -349,7 +349,7 @@ GIT-VERSION-FILE: FORCE
>
> # CFLAGS and LDFLAGS are for the users to override from the command line.
>
> -CFLAGS = -g -O2 -Wall
> +CFLAGS = -g -O2 -Wall -Wno-format-zero-length
Thanks for taking this on. Two thoughts:
1) As Felipe mentioned, this isn't portable. Would it make sense to
make it conditional on the value of $(CC) or the output of
"$(CC) --version"?
2) I don't understand the value of -Wformat-zero-length at all. What
bug is it meant to prevent? Do you know if anyone has asked the
GCC maintainers to disable it from the default set of warnings in
-Wall, which would give us a bug number to point to?
3) Since we don't enable -Werror by default (which is really good ---
use of -Werror can be a fine development tool but is a terrible
default), the warning does not actually do much harm. When it
becomes harmful is when someone turns on -Werror for static
analysis purposes and is unable to move forward from there. Do we
document suggested pedantic compiler flags anywhere other than the
todo:Make script? Should we?
I suspect such a documentation fix would have more impact, since it
could encourage people to experiment with flags and to check their
code strictly even when warnings are not portable, without
significantly slowing down the normal build.
For reference, todo:Make suggests the following flags:
-Wpointer-arith -Woverflow -Wunused \
-Wno-pointer-to-int-cast -Werror \
-Wold-style-definition std=c99 -O2 \
-Wall -Wdeclaration-after-statement -Wno-format-zero-length -g
Hope that helps,
Jonathan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-29 19:00 ` Jonathan Nieder
@ 2013-09-30 20:14 ` Jeff King
2013-09-30 21:26 ` Jonathan Nieder
2013-09-30 21:38 ` Stefan Beller
0 siblings, 2 replies; 10+ messages in thread
From: Jeff King @ 2013-09-30 20:14 UTC (permalink / raw
To: Jonathan Nieder; +Cc: Stefan Beller, git, gitster
On Sun, Sep 29, 2013 at 12:00:17PM -0700, Jonathan Nieder wrote:
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -349,7 +349,7 @@ GIT-VERSION-FILE: FORCE
> >
> > # CFLAGS and LDFLAGS are for the users to override from the command line.
> >
> > -CFLAGS = -g -O2 -Wall
> > +CFLAGS = -g -O2 -Wall -Wno-format-zero-length
>
> Thanks for taking this on. Two thoughts:
>
> 1) As Felipe mentioned, this isn't portable. Would it make sense to
> make it conditional on the value of $(CC) or the output of
> "$(CC) --version"?
I'm not sure checking just "$(CC)" would help. Our default is "cc",
which encompasses quite a wide variety of compilers, gcc and otherwise.
To be honest, I'm surprised that "-Wall" doesn't create problems for
older "cc" implementations. We've had patches for compiling with
antique SUNWspro and MIPSpro compilers, and I sort of assumed that those
don't handle "-Wall". But maybe they do. Or maybe people doing that just
set CFLAGS themselves.
I think the original discussion ended with "well, maybe it's not too bad
for people to just turn on -Wno-format-zero-length". But if it is
creating a cognitive burden on people (it's not hard to do, but you have
to figure out that you need to do it), and especially if we are looking
at workarounds like version-detecting gcc, I think we'd be better off to
simply mark up the few callsites. Workarounds are here:
http://article.gmane.org/gmane.comp.version-control.git/230026
and here:
http://article.gmane.org/gmane.comp.version-control.git/230027
> 2) I don't understand the value of -Wformat-zero-length at all. What
> bug is it meant to prevent? Do you know if anyone has asked the
> GCC maintainers to disable it from the default set of warnings in
> -Wall, which would give us a bug number to point to?
I don't think there is an open bug anywhere. When this came up
initially, I searched for other reports, but mostly found a handful of
other people running into the same situation and adding
-Wno-format-zero-length to their projects.
As for the value of it, I think it is basically to detect that:
printf("");
is a dead-code noop (bearing in mind that the "" may also be non-obvious
when reading the code due to preprocessing), and may indicate some kind
of logic error. That's reasonable to warn about; the compiler knows
that stdio formatting functions with an empty format are noops.
But where we run into trouble is that the warning assumes that other
formatting functions are also noops in that case, which is not
necessarily true. They might have side effects, or the empty string
might be formatted with extra decoration (adding a newline, wrapping the
empty string in quotes, etc).
So I do not think the correct solution (from gcc's perspective) would be
to turn off -Wformat-zero-length by default. It would rather be to
enhance the annotation for the format attribute to separate the two
cases, and to annotate printf() and friends with some kind of
"pure-format" attribute.
> 3) Since we don't enable -Werror by default (which is really good ---
> use of -Werror can be a fine development tool but is a terrible
> default), the warning does not actually do much harm.
Yeah, I think the world is a better place if every developer of git
should compiles with -Werror, but it is a terrible default for consumers
of the code.
> becomes harmful is when someone turns on -Werror for static
> analysis purposes and is unable to move forward from there. Do we
> document suggested pedantic compiler flags anywhere other than the
> todo:Make script? Should we?
It should probably be somewhere in the actual git.git history, as very
few people look at the todo branch. I guess INSTALL or CodingGuidelines
would be the most appropriate place.
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-30 20:14 ` Jeff King
@ 2013-09-30 21:26 ` Jonathan Nieder
2013-09-30 21:34 ` Jeff King
2013-09-30 21:38 ` Stefan Beller
1 sibling, 1 reply; 10+ messages in thread
From: Jonathan Nieder @ 2013-09-30 21:26 UTC (permalink / raw
To: Jeff King; +Cc: Stefan Beller, git, gitster
Jeff King wrote:
> I think we'd be better off to
> simply mark up the few callsites. Workarounds are here:
>
> http://article.gmane.org/gmane.comp.version-control.git/230026
Yeah, that looks okay (ugly but tolerable). It's tempting to do
something like
- status_printf_ln(s, GIT_COLOR_NORMAL, "");
+ status_nl(s, GIT_COLOR_NORMAL);
and
- status_printf(s, color(WT_STATUS_HEADER, s), "");
+ status_start_line(s, color(WT_STATUS_HEADER, s));
to make the intent clearer. Sane?
Jonathan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-30 21:26 ` Jonathan Nieder
@ 2013-09-30 21:34 ` Jeff King
0 siblings, 0 replies; 10+ messages in thread
From: Jeff King @ 2013-09-30 21:34 UTC (permalink / raw
To: Jonathan Nieder; +Cc: Stefan Beller, git, gitster
On Mon, Sep 30, 2013 at 02:26:36PM -0700, Jonathan Nieder wrote:
> Jeff King wrote:
>
> > I think we'd be better off to
> > simply mark up the few callsites. Workarounds are here:
> >
> > http://article.gmane.org/gmane.comp.version-control.git/230026
>
> Yeah, that looks okay (ugly but tolerable). It's tempting to do
> something like
>
> - status_printf_ln(s, GIT_COLOR_NORMAL, "");
> + status_nl(s, GIT_COLOR_NORMAL);
>
> and
>
> - status_printf(s, color(WT_STATUS_HEADER, s), "");
> + status_start_line(s, color(WT_STATUS_HEADER, s));
>
> to make the intent clearer. Sane?
Yeah, I hinted at adding wrappers like this in the earlier thread but
didn't actually try it. I think the approach is reasonable, as I doubt
the wrappers should require too much refactoring.
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-30 20:14 ` Jeff King
2013-09-30 21:26 ` Jonathan Nieder
@ 2013-09-30 21:38 ` Stefan Beller
2013-09-30 23:23 ` Jeff King
1 sibling, 1 reply; 10+ messages in thread
From: Stefan Beller @ 2013-09-30 21:38 UTC (permalink / raw
To: Jeff King, Jonathan Nieder; +Cc: git, gitster
[-- Attachment #1: Type: text/plain, Size: 4866 bytes --]
On 09/30/2013 10:14 PM, Jeff King wrote:
> On Sun, Sep 29, 2013 at 12:00:17PM -0700, Jonathan Nieder wrote:
>
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -349,7 +349,7 @@ GIT-VERSION-FILE: FORCE
>>>
>>> # CFLAGS and LDFLAGS are for the users to override from the command line.
>>>
>>> -CFLAGS = -g -O2 -Wall
>>> +CFLAGS = -g -O2 -Wall -Wno-format-zero-length
>>
>> Thanks for taking this on. Two thoughts:
>>
>> 1) As Felipe mentioned, this isn't portable. Would it make sense to
>> make it conditional on the value of $(CC) or the output of
>> "$(CC) --version"?
>
> I'm not sure checking just "$(CC)" would help. Our default is "cc",
> which encompasses quite a wide variety of compilers, gcc and otherwise.
>
> To be honest, I'm surprised that "-Wall" doesn't create problems for
> older "cc" implementations. We've had patches for compiling with
> antique SUNWspro and MIPSpro compilers, and I sort of assumed that those
> don't handle "-Wall". But maybe they do. Or maybe people doing that just
> set CFLAGS themselves.
Well actually I do think people are encouraged to play around with their
CFLAGS as much as they like. I do add link time optimisation usually.
However I do have the strong opinion that any serious project should
compile without any warning/error with the standard compilers of
the current time. That's why I started an attempt again to have
-Wno-format-zero-length in there by default. Most of the people (I
assume so) are using gcc. So it should build fine there without any
warnings.
Sure it should build without errors as well on other architectures, so I
do understand the issue to check if we're really
using gcc and can omit this flag if using another compiler.
>
> I think the original discussion ended with "well, maybe it's not too bad
> for people to just turn on -Wno-format-zero-length". But if it is
> creating a cognitive burden on people (it's not hard to do, but you have
> to figure out that you need to do it), and especially if we are looking
> at workarounds like version-detecting gcc, I think we'd be better off to
> simply mark up the few callsites. Workarounds are here:
>
> http://article.gmane.org/gmane.comp.version-control.git/230026
>
> and here:
>
> http://article.gmane.org/gmane.comp.version-control.git/230027
and here
http://thread.gmane.org/gmane.comp.version-control.git/230806
>
>> 2) I don't understand the value of -Wformat-zero-length at all. What
>> bug is it meant to prevent? Do you know if anyone has asked the
>> GCC maintainers to disable it from the default set of warnings in
>> -Wall, which would give us a bug number to point to?
>
> I don't think there is an open bug anywhere. When this came up
> initially, I searched for other reports, but mostly found a handful of
> other people running into the same situation and adding
> -Wno-format-zero-length to their projects.
>
> As for the value of it, I think it is basically to detect that:
>
> printf("");
>
> is a dead-code noop (bearing in mind that the "" may also be non-obvious
> when reading the code due to preprocessing), and may indicate some kind
> of logic error. That's reasonable to warn about; the compiler knows
> that stdio formatting functions with an empty format are noops.
>
> But where we run into trouble is that the warning assumes that other
> formatting functions are also noops in that case, which is not
> necessarily true. They might have side effects, or the empty string
> might be formatted with extra decoration (adding a newline, wrapping the
> empty string in quotes, etc).
>
> So I do not think the correct solution (from gcc's perspective) would be
> to turn off -Wformat-zero-length by default. It would rather be to
> enhance the annotation for the format attribute to separate the two
> cases, and to annotate printf() and friends with some kind of
> "pure-format" attribute.
I do agree. :)
>
>> 3) Since we don't enable -Werror by default (which is really good ---
>> use of -Werror can be a fine development tool but is a terrible
>> default), the warning does not actually do much harm.
>
> Yeah, I think the world is a better place if every developer of git
> should compiles with -Werror, but it is a terrible default for consumers
> of the code.
>
>> becomes harmful is when someone turns on -Werror for static
>> analysis purposes and is unable to move forward from there. Do we
>> document suggested pedantic compiler flags anywhere other than the
>> todo:Make script? Should we?
>
> It should probably be somewhere in the actual git.git history, as very
> few people look at the todo branch. I guess INSTALL or CodingGuidelines
> would be the most appropriate place.
>
> -Peff
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Makefile: suppress false positive warnings of empty format string.
2013-09-30 21:38 ` Stefan Beller
@ 2013-09-30 23:23 ` Jeff King
0 siblings, 0 replies; 10+ messages in thread
From: Jeff King @ 2013-09-30 23:23 UTC (permalink / raw
To: Stefan Beller; +Cc: Jonathan Nieder, git, gitster
On Mon, Sep 30, 2013 at 11:38:33PM +0200, Stefan Beller wrote:
> > To be honest, I'm surprised that "-Wall" doesn't create problems for
> > older "cc" implementations. We've had patches for compiling with
> > antique SUNWspro and MIPSpro compilers, and I sort of assumed that those
> > don't handle "-Wall". But maybe they do. Or maybe people doing that just
> > set CFLAGS themselves.
>
> Well actually I do think people are encouraged to play around with their
> CFLAGS as much as they like. I do add link time optimisation usually.
Oh, absolutely. I didn't mean to give the impression that you should not
tweak CFLAGS. That's what it's there for. I just meant that I do not
recall seeing complaints from people on such compilers, so either it
actually works, or they are savvy enough to tweak CFLAGS without making
a complaint. Or they no longer exist. The patches I'm thinking of were
from 2008, and the compilers and systems were old then.
> However I do have the strong opinion that any serious project should
> compile without any warning/error with the standard compilers of
> the current time. That's why I started an attempt again to have
> -Wno-format-zero-length in there by default. Most of the people (I
> assume so) are using gcc. So it should build fine there without any
> warnings.
Yeah, I'd agree it is a good goal.
> Sure it should build without errors as well on other architectures, so
> I do understand the issue to check if we're really using gcc and can
> omit this flag if using another compiler.
Right, agreed.
> and here
> http://thread.gmane.org/gmane.comp.version-control.git/230806
Thanks, I didn't recall that one.
I still think if we are going to start doing gcc auto-detection in the
Makefile, it is slightly less ugly to just tweak the few callsites to
prevent the warning in the first place. I think gcc is being silly to
warn about, but it is the path of least resistance and maintenance.
-Peff
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-09-30 23:23 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11 23:36 What's cooking in git.git (Jul 2013, #04; Thu, 11) Junio C Hamano
2013-09-29 12:08 ` [PATCH] Makefile: suppress false positive warnings of empty format string Stefan Beller
2013-09-29 15:07 ` Felipe Contreras
2013-09-29 15:23 ` Ramsay Jones
2013-09-29 19:00 ` Jonathan Nieder
2013-09-30 20:14 ` Jeff King
2013-09-30 21:26 ` Jonathan Nieder
2013-09-30 21:34 ` Jeff King
2013-09-30 21:38 ` Stefan Beller
2013-09-30 23:23 ` Jeff King
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).