* Re: orphan blob or what?
From: bruce @ 2012-11-09 19:37 UTC (permalink / raw)
To: Tomas Carnecky; +Cc: git
In-Reply-To: <1352423287-ner-8337@calvin>
Tomas Carnecky <tomas.carnecky@gmail.com> writes:
Just idiocy on my part. Thanks.
> On Thu, 08 Nov 2012 16:24:36 -0800, bruce <bruce.e.robertson@intel.com> wrote:
>> In today's and older clones of https://github.com/mirrors/linux.git I
>> find this object, 6fa98ea0ae40f9a38256f11e5dc270363f785aee, that I can't
>> figure out how to eliminate^h^h^h^h^h^h^h^h^hget rid of. I don't see it
>> in 'git fsck', 'git gc --aggressive --prune' doesn't seem to prune it,
>> can't see it via 'git log'. And yet
>>
>> linux/.git/objects/pack$ git verify-pack -v *.idx | grep 6fa98ea0ae40f9a38256f11e5dc270363f785aee
>> 6fa98ea0ae40f9a38256f11e5dc270363f785aee blob 1519697 124840 515299673
>> 8231eaa31ce1107c1463deb6ec33f61618aedbb9 blob 67 63 515424513 1 6fa98ea0ae40f9a38256f11e5dc270363f785aee
>> f21a8c1b9d47736fa4e27def66f04b9fe2b4bc53 blob 90 83 515424576 1 6fa98ea0ae40f9a38256f11e5dc270363f785aee
>
> Commit dee0bb9 (ASoC: Mark WM8962 Additional Control 4 register as volatile,
> 2010-09-29) references this blob.
^ permalink raw reply
* What's cooking in git.git (Nov 2012, #02; Fri, 9)
From: Jeff King @ 2012-11-09 19:23 UTC (permalink / raw)
To: git
What's cooking in git.git (Nov 2012, #02; Fri, 9)
--------------------------------------------------
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.
The fourth batch of topics has graduated to master. This should be my
last integration cycle, as Junio will be back to take over before the
next one.
You can find the changes described here in the integration branches of
my repository at:
git://github.com/peff/git.git
Until Junio returns, kernel.org and the other "usual" places will not be
updated.
--------------------------------------------------
[New Topics]
* cr/push-force-tag-update (2012-11-09) 5 commits
- push: update remote tags only with force
- push: flag updates that require force
- push: flag updates
- push: add advice for rejected tag reference
- push: return reject reasons via a mask
Require "-f" for push to update a tag, even if it is a fast-forward.
Needs review.
I'm undecided yet on whether the goal is the right thing to do, but it
does prevent some potential mistakes. I haven't looked closely at the
implementation itself; review from interested parties would be helpful.
* fc/fast-export-fixes (2012-11-08) 14 commits
- fast-export: don't handle uninteresting refs
- fast-export: make sure updated refs get updated
- fast-export: fix comparison in tests
- fast-export: trivial cleanup
- remote-testgit: make clear the 'done' feature
- remote-testgit: report success after an import
- remote-testgit: exercise more features
- remote-testgit: cleanup tests
- remote-testgit: remove irrelevant test
- remote-testgit: get rid of non-local functionality
- Add new simplified git-remote-testgit
- Rename git-remote-testgit to git-remote-testpy
- remote-testgit: fix direction of marks
- fast-export: avoid importing blob marks
Improvements to fix fast-export bugs, including how refs pointing to
already-seen commits are handled. An earlier 4-commit version of this
series looked good to me, but this much-expanded version has not seen
any comments.
Needs review.
* mg/maint-pull-suggest-upstream-to (2012-11-08) 1 commit
- push/pull: adjust missing upstream help text to changed interface
Follow-on to the new "--set-upstream-to" topic from v1.8.0 to avoid
suggesting the deprecated "--set-upstream".
Will merge to 'next'.
* mh/alt-odb-string-list-cleanup (2012-11-08) 2 commits
- link_alt_odb_entries(): take (char *, len) rather than two pointers
- link_alt_odb_entries(): use string_list_split_in_place()
Cleanups in the alternates code. Fixes a potential bug and makes the
code much cleaner.
Will merge to 'next'.
* pf/editor-ignore-sigint (2012-11-08) 1 commit
- launch_editor: ignore SIGINT while the editor has control
Avoid confusing cases where the user hits Ctrl-C while in the editor
session, not realizing git will receive the signal. Since most editors
will take over the terminal and will block SIGINT, this is not likely
to confuse anyone.
Comments welcome from people using unusual editors (e.g., a script that
starts an editor in another window then blocks, waiting for the user to
finish).
* pp/gitweb-config-underscore (2012-11-08) 1 commit
- gitweb: make remote_heads config setting work
The key "gitweb.remote_heads" is not legal git config; this maps it to
"gitweb.remoteheads".
Junio raised a good point about the implementation for three-level
variables.
Expecting a re-roll.
* pw/maint-p4-rcs-expansion-newline (2012-11-08) 1 commit
- git p4: RCS expansion should not span newlines
I do not have p4 to play with, but looks obviously correct to me.
Will merge to 'next'.
* rh/maint-gitweb-highlight-ext (2012-11-08) 1 commit
- gitweb.perl: fix %highlight_ext mappings
Fixes a clever misuse of perl's list interpretation.
Will merge to 'next'.
* rr/submodule-diff-config (2012-11-08) 3 commits
- submodule: display summary header in bold
- diff: introduce diff.submodule configuration variable
- Documentation: move diff.wordRegex from config.txt to diff-config.txt
Lets "git diff --submodule=log" become the default via configuration.
Seems like a good direction, though I had a few comments.
Expecting a re-roll.
--------------------------------------------------
[Graduated to "master"]
* fc/completion-send-email-with-format-patch (2012-10-16) 1 commit
(merged to 'next' on 2012-11-04 at 0a6366e)
+ completion: add format-patch options to send-email
Will merge to 'master' in the fourth batch.
* js/format-2047 (2012-10-18) 7 commits
(merged to 'next' on 2012-10-25 at 76d91fe)
+ format-patch tests: check quoting/encoding in To: and Cc: headers
+ format-patch: fix rfc2047 address encoding with respect to rfc822 specials
+ format-patch: make rfc2047 encoding more strict
+ format-patch: introduce helper function last_line_length()
+ format-patch: do not wrap rfc2047 encoded headers too late
+ format-patch: do not wrap non-rfc2047 headers too early
+ utf8: fix off-by-one wrapping of text
Fixes many rfc2047 quoting issues in the output from format-patch.
Will merge to 'master' in the fourth batch.
* km/send-email-compose-encoding (2012-10-25) 5 commits
(merged to 'next' on 2012-10-29 at d7d2bb4)
+ git-send-email: add rfc2047 quoting for "=?"
+ git-send-email: introduce quote_subject()
+ git-send-email: skip RFC2047 quoting for ASCII subjects
+ git-send-email: use compose-encoding for Subject
(merged to 'next' on 2012-10-25 at 5447367)
+ git-send-email: introduce compose-encoding
"git send-email --compose" can let the user create a non-ascii
cover letter message, but there was not a way to mark it with
appropriate content type before sending it out.
Further updates fix subject quoting.
Will merge to 'master' in the fourth batch.
* mh/maint-parse-dirstat-fix (2012-10-29) 1 commit
(merged to 'next' on 2012-11-04 at 852d609)
+ parse_dirstat_params(): use string_list to split comma-separated string
Cleans up some code and avoids a potential bug.
Will merge to 'master' in the fourth batch.
* mo/cvs-server-cleanup (2012-10-26) 11 commits
(merged to 'next' on 2012-10-29 at 4e70622)
+ Use character class for sed expression instead of \s
(merged to 'next' on 2012-10-25 at c70881d)
+ cvsserver status: provide real sticky info
+ cvsserver: cvs add: do not expand directory arguments
+ cvsserver: use whole CVS rev number in-process; don't strip "1." prefix
+ cvsserver: split up long lines in req_{status,diff,log}
+ cvsserver: clean up client request handler map comments
+ cvsserver: remove unused functions _headrev and gethistory
+ cvsserver update: comment about how we shouldn't remove a user-modified file
+ cvsserver: add comments about database schema/usage
+ cvsserver: removed unused sha1Or-k mode from kopts_from_path
+ cvsserver t9400: add basic 'cvs log' test
(this branch is tangled with mo/cvs-server-updates.)
Cleanups to prepare for mo/cvs-server-updates.
Will merge to 'master' in the fourth batch.
* nd/attr-match-optim-more (2012-10-15) 7 commits
(merged to 'next' on 2012-10-25 at 09f70ce)
+ attr: more matching optimizations from .gitignore
+ gitignore: make pattern parsing code a separate function
+ exclude: split pathname matching code into a separate function
+ exclude: fix a bug in prefix compare optimization
+ exclude: split basename matching code into a separate function
+ exclude: stricten a length check in EXC_FLAG_ENDSWITH case
+ Merge commit 'f9f6e2c' into nd/attr-match-optim-more
(this branch is used by as/check-ignore and nd/wildmatch.)
Start laying the foundation to build the "wildmatch" after we can
agree on its desired semantics.
Will merge to 'master' in the fourth batch.
* nd/builtin-to-libgit (2012-10-29) 7 commits
(merged to 'next' on 2012-11-04 at 06cbf9b)
+ fetch-pack: move core code to libgit.a
+ fetch-pack: remove global (static) configuration variable "args"
+ send-pack: move core code to libgit.a
+ Move setup_diff_pager to libgit.a
+ Move print_commit_list to libgit.a
+ Move estimate_bisect_steps to libgit.a
+ Move try_merge_command and checkout_fast_forward to libgit.a
Code cleanups so that libgit.a does not depend on anything in the
builtin/ directory.
Some of the code movement is pretty big, but there doesn't seem to be
any conflicts with topics in flight.
Will merge to 'master' in the fourth batch.
* nd/tree-walk-enum-cleanup (2012-10-19) 1 commit
(merged to 'next' on 2012-11-04 at 8ccdf98)
+ tree-walk: use enum interesting instead of integer
Will merge to 'master' in the fourth batch.
* ph/maint-submodule-status-fix (2012-10-29) 2 commits
(merged to 'next' on 2012-11-04 at d700e02)
+ submodule status: remove unused orig_* variables
+ t7407: Fix recursive submodule test
Cleans up some leftover bits from an earlier submodule change.
Will merge to 'master' in the fourth batch.
* rs/lock-correct-ref-during-delete (2012-10-16) 1 commit
(merged to 'next' on 2012-10-25 at 9341eea)
+ refs: lock symref that is to be deleted, not its target
When "update-ref -d --no-deref SYM" tried to delete a symbolic ref
SYM, it incorrectly locked the underlying reference pointed by SYM,
not the symbolic ref itself.
Will merge to 'master' in the fourth batch.
* sz/maint-curl-multi-timeout (2012-10-19) 1 commit
(merged to 'next' on 2012-11-04 at f696dd8)
+ Fix potential hang in https handshake
Sometimes curl_multi_timeout() function suggested a wrong timeout
value when there is no file descriptors to wait on and the http
transport ended up sleeping for minutes in select(2) system call.
Detect this and reduce the wait timeout in such a case.
Will merge to 'master' in the fourth batch.
--------------------------------------------------
[Stalled]
* rc/maint-complete-git-p4 (2012-09-24) 1 commit
(merged to 'next' on 2012-10-29 at af52cef)
+ Teach git-completion about git p4
Comment from Pete will need to be addressed in a follow-up patch.
* as/test-tweaks (2012-09-20) 7 commits
- tests: paint unexpectedly fixed known breakages in bold red
- tests: test the test framework more thoroughly
- [SQUASH] t/t0000-basic.sh: quoting of TEST_DIRECTORY is screwed up
- tests: refactor mechanics of testing in a sub test-lib
- tests: paint skipped tests in bold blue
- tests: test number comes first in 'not ok $count - $message'
- tests: paint known breakages in bold yellow
Various minor tweaks to the test framework to paint its output
lines in colors that match what they mean better.
Has the "is this really blue?" issue Peff raised resolved???
* jc/maint-name-rev (2012-09-17) 7 commits
- describe --contains: use "name-rev --algorithm=weight"
- name-rev --algorithm=weight: tests and documentation
- name-rev --algorithm=weight: cache the computed weight in notes
- name-rev --algorithm=weight: trivial optimization
- name-rev: --algorithm option
- name_rev: clarify the logic to assign a new tip-name to a commit
- name-rev: lose unnecessary typedef
"git name-rev" names the given revision based on a ref that can be
reached in the smallest number of steps from the rev, but that is
not useful when the caller wants to know which tag is the oldest one
that contains the rev. This teaches a new mode to the command that
uses the oldest ref among those which contain the rev.
I am not sure if this is worth it; for one thing, even with the help
from notes-cache, it seems to make the "describe --contains" even
slower. Also the command will be unusably slow for a user who does
not have a write access (hence unable to create or update the
notes-cache).
Stalled mostly due to lack of responses.
* jc/xprm-generation (2012-09-14) 1 commit
- test-generation: compute generation numbers and clock skews
A toy to analyze how bad the clock skews are in histories of real
world projects.
Stalled mostly due to lack of responses.
* jc/blame-no-follow (2012-09-21) 2 commits
- blame: pay attention to --no-follow
- diff: accept --no-follow option
Teaches "--no-follow" option to "git blame" to disable its
whole-file rename detection.
Stalled mostly due to lack of responses.
* jc/doc-default-format (2012-10-07) 2 commits
- [SQAUSH] allow "cd Doc* && make DEFAULT_DOC_TARGET=..."
- Allow generating a non-default set of documentation
Need to address the installation half if this is to be any useful.
* mk/maint-graph-infinity-loop (2012-09-25) 1 commit
- graph.c: infinite loop in git whatchanged --graph -m
The --graph code fell into infinite loop when asked to do what the
code did not expect ;-)
Anybody who worked on "--graph" wants to comment?
Stalled mostly due to lack of responses.
* jc/add-delete-default (2012-08-13) 1 commit
- git add: notice removal of tracked paths by default
"git add dir/" updated modified files and added new files, but does
not notice removed files, which may be "Huh?" to some users. They
can of course use "git add -A dir/", but why should they?
Resurrected from graveyard, as I thought it was a worthwhile thing
to do in the longer term.
Waiting for comments.
* mb/remote-default-nn-origin (2012-07-11) 6 commits
- Teach get_default_remote to respect remote.default.
- Test that plain "git fetch" uses remote.default when on a detached HEAD.
- Teach clone to set remote.default.
- Teach "git remote" about remote.default.
- Teach remote.c about the remote.default configuration setting.
- Rename remote.c's default_remote_name static variables.
When the user does not specify what remote to interact with, we
often attempt to use 'origin'. This can now be customized via a
configuration variable.
Expecting a re-roll.
"The first remote becomes the default" bit is better done as a
separate step.
* mh/ceiling (2012-10-29) 8 commits
- string_list_longest_prefix(): remove function
- setup_git_directory_gently_1(): resolve symlinks in ceiling paths
- longest_ancestor_length(): require prefix list entries to be normalized
- longest_ancestor_length(): take a string_list argument for prefixes
- longest_ancestor_length(): use string_list_split()
- Introduce new function real_path_if_valid()
- real_path_internal(): add comment explaining use of cwd
- Introduce new static function real_path_internal()
Elements of GIT_CEILING_DIRECTORIES list may not match the real
pathname we obtain from getcwd(), leading the GIT_DIR discovery
logic to escape the ceilings the user thought to have specified.
--------------------------------------------------
[Cooking]
* mo/cvs-server-updates (2012-10-16) 10 commits
- cvsserver Documentation: new cvs ... -r support
- cvsserver: add t9402 to test branch and tag refs
- cvsserver: support -r and sticky tags for most operations
- cvsserver: Add version awareness to argsfromdir
- cvsserver: generalize getmeta() to recognize commit refs
- cvsserver: implement req_Sticky and related utilities
- cvsserver: add misc commit lookup, file meta data, and file listing functions
- cvsserver: define a tag name character escape mechanism
- cvsserver: cleanup extra slashes in filename arguments
- cvsserver: factor out git-log parsing logic
Needs review by folks interested in cvsserver.
* ta/doc-cleanup (2012-10-25) 6 commits
- Documentation: build html for all files in technical and howto
- Documentation/howto: convert plain text files to asciidoc
- Documentation/technical: convert plain text files to asciidoc
- Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
- Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
- Split over-long synopsis in git-fetch-pack.txt into several lines
Will merge to 'next'.
* lt/diff-stat-show-0-lines (2012-10-17) 1 commit
- Fix "git diff --stat" for interesting - but empty - file changes
We failed to mention a file without any content change but whose
permission bit was modified, or (worse yet) a new file without any
content in the "git diff --stat" output.
Needs some test updates.
* jc/prettier-pretty-note (2012-10-26) 11 commits
(merged to 'next' on 2012-11-04 at 40e3e48)
+ Doc User-Manual: Patch cover letter, three dashes, and --notes
+ Doc format-patch: clarify --notes use case
+ Doc notes: Include the format-patch --notes option
+ Doc SubmittingPatches: Mention --notes option after "cover letter"
+ Documentation: decribe format-patch --notes
+ format-patch --notes: show notes after three-dashes
+ format-patch: append --signature after notes
+ pretty_print_commit(): do not append notes message
+ pretty: prepare notes message at a centralized place
+ format_note(): simplify API
+ pretty: remove reencode_commit_message()
Now that Philip has submitted some documentation updates, this is
looking more ready.
Will merge to 'master' in the fifth batch.
* jc/same-encoding (2012-11-04) 1 commit
(merged to 'next' on 2012-11-04 at 54991f2)
+ reencode_string(): introduce and use same_encoding()
Various codepaths checked if two encoding names are the same using
ad-hoc code and some of them ended up asking iconv() to convert
between "utf8" and "UTF-8". The former is not a valid way to spell
the encoding name, but often people use it by mistake, and we
equated them in some but not all codepaths. Introduce a new helper
function to make these codepaths consistent.
Will merge to 'master' in the fifth batch.
* cr/cvsimport-local-zone (2012-11-04) 2 commits
(merged to 'next' on 2012-11-04 at 292f0b4)
+ cvsimport: work around perl tzset issue
+ git-cvsimport: allow author-specific timezones
Allows "cvsimport" to read per-author timezone from the author info
file.
Will merge to 'master' in the fifth batch.
* fc/zsh-completion (2012-10-29) 3 commits
- completion: add new zsh completion
- completion: add new __gitcompadd helper
- completion: get rid of empty COMPREPLY assignments
There were some comments on this, but I wasn't clear on the outcome.
Need to take a closer look.
* jc/apply-trailing-blank-removal (2012-10-12) 1 commit
- apply.c:update_pre_post_images(): the preimage can be truncated
Fix to update_pre_post_images() that did not take into account the
possibility that whitespace fix could shrink the preimage and
change the number of lines in it.
Extra set of eyeballs appreciated.
* jn/warn-on-inaccessible-loosen (2012-10-14) 4 commits
- config: exit on error accessing any config file
- doc: advertise GIT_CONFIG_NOSYSTEM
- config: treat user and xdg config permission problems as errors
- config, gitignore: failure to access with ENOTDIR is ok
An RFC to deal with a situation where .config/git is a file and we
notice .config/git/config is not readable due to ENOTDIR, not
ENOENT; I think a bit more refactored approach to consistently
address permission errors across config, exclude and attrs is
desirable. Don't we also need a check for an opposite situation
where we open .config/git/config or .gitattributes for reading but
they turn out to be directories?
* as/check-ignore (2012-11-08) 14 commits
- t0007: fix tests on Windows
- Documentation/check-ignore: we show the deciding match, not the first
- Add git-check-ignore sub-command
- dir.c: provide free_directory() for reclaiming dir_struct memory
- pathspec.c: move reusable code from builtin/add.c
- dir.c: refactor treat_gitlinks()
- dir.c: keep track of where patterns came from
- dir.c: refactor is_path_excluded()
- dir.c: refactor is_excluded()
- dir.c: refactor is_excluded_from_list()
- dir.c: rename excluded() to is_excluded()
- dir.c: rename excluded_from_list() to is_excluded_from_list()
- dir.c: rename path_excluded() to is_path_excluded()
- dir.c: rename cryptic 'which' variable to more consistent name
Duy helped to reroll this.
Expecting a re-roll.
* so/prompt-command (2012-10-17) 4 commits
(merged to 'next' on 2012-10-25 at 79565a1)
+ coloured git-prompt: paint detached HEAD marker in red
+ Fix up colored git-prompt
+ show color hints based on state of the git tree
+ Allow __git_ps1 to be used in PROMPT_COMMAND
Updates __git_ps1 so that it can be used as $PROMPT_COMMAND,
instead of being used for command substitution in $PS1, to embed
color escape sequences in its output.
Will cook in 'next'.
* aw/rebase-am-failure-detection (2012-10-11) 1 commit
- rebase: Handle cases where format-patch fails
I am unhappy a bit about the possible performance implications of
having to store the output in a temporary file only for a rare case
of format-patch aborting.
* nd/wildmatch (2012-10-15) 13 commits
(merged to 'next' on 2012-10-25 at 510e8df)
+ Support "**" wildcard in .gitignore and .gitattributes
+ wildmatch: make /**/ match zero or more directories
+ wildmatch: adjust "**" behavior
+ wildmatch: fix case-insensitive matching
+ wildmatch: remove static variable force_lower_case
+ wildmatch: make wildmatch's return value compatible with fnmatch
+ t3070: disable unreliable fnmatch tests
+ Integrate wildmatch to git
+ wildmatch: follow Git's coding convention
+ wildmatch: remove unnecessary functions
+ Import wildmatch from rsync
+ ctype: support iscntrl, ispunct, isxdigit and isprint
+ ctype: make sane_ctype[] const array
Allows pathname patterns in .gitignore and .gitattributes files
with double-asterisks "foo/**/bar" to match any number of directory
hierarchies.
I suspect that this needs to be plugged to pathspec matching code;
otherwise "git log -- 'Docum*/**/*.txt'" would not show the log for
commits that touch Documentation/git.txt, which would be confusing
to the users.
Will cook in 'next'.
* jk/lua-hackery (2012-10-07) 6 commits
- pretty: fix up one-off format_commit_message calls
- Minimum compilation fixup
- Makefile: make "lua" a bit more configurable
- add a "lua" pretty format
- add basic lua infrastructure
- pretty: make some commit-parsing helpers more public
Interesting exercise. When we do this for real, we probably would want
to wrap a commit to make it more like an "object" with methods like
"parents", etc.
* nd/pretty-placeholder-with-color-option (2012-09-30) 9 commits
. pretty: support %>> that steal trailing spaces
. pretty: support truncating in %>, %< and %><
. pretty: support padding placeholders, %< %> and %><
. pretty: two phase conversion for non utf-8 commits
. utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences
. utf8.c: move display_mode_esc_sequence_len() for use by other functions
. pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s)
. pretty: split parsing %C into a separate function
. pretty: share code between format_decoration and show_decorations
This causes warnings with -Wuninitialized, so I've ejected it from pu
for the time being.
* jc/maint-fetch-tighten-refname-check (2012-10-19) 1 commit
(merged to 'next' on 2012-11-04 at eda85ef)
+ get_fetch_map(): tighten checks on dest refs
This was split out from discarded jc/maint-push-refs-all topic.
Will merge to 'master' in the fifth batch.
* jh/symbolic-ref-d (2012-10-21) 1 commit
(merged to 'next' on 2012-11-04 at b0762f5)
+ git symbolic-ref --delete $symref
Add "symbolic-ref -d SYM" to delete a symbolic ref SYM.
It is already possible to remove a symbolic ref with "update-ref -d
--no-deref", but it may be a good addition for completeness.
Will merge to 'master' in the fifth batch.
* jh/update-ref-d-through-symref (2012-10-21) 2 commits
- Fix failure to delete a packed ref through a symref
- t1400-update-ref: Add test verifying bug with symrefs in delete_ref()
"update-ref -d --deref SYM" to delete a ref through a symbolic ref
that points to it did not remove it correctly.
* jk/config-ignore-duplicates (2012-10-29) 9 commits
(merged to 'next' on 2012-10-29 at 67fa0a2)
+ builtin/config.c: Fix a sparse warning
(merged to 'next' on 2012-10-25 at 233df08)
+ git-config: use git_config_with_options
+ git-config: do not complain about duplicate entries
+ git-config: collect values instead of immediately printing
+ git-config: fix regexp memory leaks on error conditions
+ git-config: remove memory leak of key regexp
+ t1300: test "git config --get-all" more thoroughly
+ t1300: remove redundant test
+ t1300: style updates
Drop duplicate detection from git-config; this lets it
better match the internal config callbacks, which clears up
some corner cases with includes.
Will cook in 'next'.
* ph/submodule-sync-recursive (2012-10-29) 2 commits
(merged to 'next' on 2012-11-04 at a000f78)
+ Add tests for submodule sync --recursive
+ Teach --recursive to submodule sync
Adds "--recursive" option to submodule sync.
Will merge to 'master' in the fifth batch.
* fc/completion-test-simplification (2012-10-29) 2 commits
- completion: simplify __gitcomp test helper
- completion: refactor __gitcomp related tests
Clean up completion tests.
There were some comments on the list.
Expecting a re-roll.
* fc/remote-testgit-feature-done (2012-10-29) 1 commit
- remote-testgit: properly check for errors
Needs review.
* jk/maint-diff-grep-textconv (2012-10-28) 1 commit
(merged to 'next' on 2012-11-04 at 790337b)
+ diff_grep: use textconv buffers for add/deleted files
(this branch is used by jk/pickaxe-textconv.)
Fixes inconsistent use of textconv with "git log -G".
Will merge to 'master' in the fifth batch.
* jk/pickaxe-textconv (2012-10-28) 2 commits
- pickaxe: use textconv for -S counting
- pickaxe: hoist empty needle check
(this branch uses jk/maint-diff-grep-textconv.)
Use textconv filters when searching with "log -S".
Waiting for a sanity check and review from Junio.
* as/maint-doc-fix-no-post-rewrite (2012-11-02) 1 commit
(merged to 'next' on 2012-11-09 at 117a91e)
+ commit: fixup misplacement of --no-post-rewrite description
Will merge to 'master' in the fifth batch.
* fc/remote-bzr (2012-11-08) 5 commits
- remote-bzr: update working tree
- remote-bzr: add support for remote repositories
- remote-bzr: add support for pushing
- remote-bzr: add simple tests
- Add new remote-bzr transport helper
New remote helper for bzr.
Will merge to 'next'.
* fc/remote-hg (2012-11-04) 16 commits
- remote-hg: the author email can be null
- remote-hg: add option to not track branches
- remote-hg: add extra author test
- remote-hg: add tests to compare with hg-git
- remote-hg: add bidirectional tests
- test-lib: avoid full path to store test results
- remote-hg: add basic tests
- remote-hg: fake bookmark when there's none
- remote-hg: add compat for hg-git author fixes
- remote-hg: add support for hg-git compat mode
- remote-hg: match hg merge behavior
- remote-hg: make sure the encoding is correct
- remote-hg: add support to push URLs
- remote-hg: add support for remote pushing
- remote-hg: add support for pushing
- Add new remote-hg transport helper
New remote helper for hg.
Will merge to 'next'.
* jk/maint-http-half-auth-fetch (2012-10-31) 2 commits
(merged to 'next' on 2012-11-09 at af69926)
+ remote-curl: retry failed requests for auth even with gzip
+ remote-curl: hoist gzip buffer size to top of post_rpc
Fixes fetch from servers that ask for auth only during the actual
packing phase. This is not really a recommended configuration, but it
cleans up the code at the same time.
Will merge to 'master' in the sixth batch.
* js/hp-nonstop (2012-10-30) 1 commit
(merged to 'next' on 2012-11-09 at fe58205)
+ fix 'make test' for HP NonStop
Will merge to 'master' in the fifth batch.
* kb/preload-index-more (2012-11-02) 1 commit
(merged to 'next' on 2012-11-09 at a750ebd)
+ update-index/diff-index: use core.preloadindex to improve performance
Use preloadindex in more places, which has a nice speedup on systems
with slow stat calls (and even on Linux).
Will merge to 'master' in the sixth batch.
* mh/notes-string-list (2012-11-08) 5 commits
(merged to 'next' on 2012-11-09 at 7a4c58c)
+ string_list_add_refs_from_colon_sep(): use string_list_split()
+ notes: fix handling of colon-separated values
+ combine_notes_cat_sort_uniq(): sort and dedup lines all at once
+ Initialize sort_uniq_list using named constant
+ string_list: add a function string_list_remove_empty_items()
Improve the asymptotic performance of the cat_sort_uniq notes merge
strategy.
Will merge to 'master' in the fifth batch.
* mh/strbuf-split (2012-11-04) 4 commits
(merged to 'next' on 2012-11-09 at fa984b1)
+ strbuf_split*(): document functions
+ strbuf_split*(): rename "delim" parameter to "terminator"
+ strbuf_split_buf(): simplify iteration
+ strbuf_split_buf(): use ALLOC_GROW()
Cleanups and documentation for strbuf_split.
Will merge to 'master' in the fifth batch.
* mm/maint-doc-commit-edit (2012-11-02) 1 commit
(merged to 'next' on 2012-11-09 at 8dab7f5)
+ Document 'git commit --no-edit' explicitly
Will merge to 'master' in the fifth batch.
^ permalink raw reply
* [PATCHv3 4/4] Add tests for git-status --sequencer
From: Phil Hord @ 2012-11-09 18:56 UTC (permalink / raw)
To: git
Cc: phil.hord, Jeff King, Junio C Hamano, konglu, Matthieu Moy,
Kong Lucien, Duperray Valentin, Jonas Franck, Nguy Thomas,
Phil Hord
In-Reply-To: <1352487385-5929-1-git-send-email-hordp@cisco.com>
Add t7061-status-sequence.sh with tests for the various
'git status --sequence' states.
I did not include tests for these states because I am not
sure how to induce these conditions organically yet:
conflicted am status
empty am status
rebase-interactive editing status
rebase-interactive splitting status
Signed-off-by: Phil Hord <hordp@cisco.com>
---
t/t7061-status-sequence.sh | 96 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100755 t/t7061-status-sequence.sh
diff --git a/t/t7061-status-sequence.sh b/t/t7061-status-sequence.sh
new file mode 100755
index 0000000..db99822
--- /dev/null
+++ b/t/t7061-status-sequence.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+test_description='sequencer state tokens'
+
+. ./test-lib.sh
+
+expect_tokens() {
+ for TOKEN in "$@" ; do
+ echo "## $TOKEN"
+ done | sort
+}
+
+status_has_only() {
+ expect_tokens "$@" >expect &&
+ git status -S | sort >actual &&
+ test_cmp expect actual
+}
+
+test_expect_success setup '
+ test_commit A &&
+ test_commit B oneside added &&
+ git checkout A^0 &&
+ test_commit C oneside created
+'
+
+test_expect_success 'status -S reports conflicted merge' '
+ git checkout B^0 &&
+ test_must_fail git merge C &&
+ status_has_only commit-pending conflicted merge
+'
+
+test_expect_success 'git reset --hard cleans up merge status' '
+ git reset --hard HEAD &&
+ status_has_only
+'
+
+test_expect_success 'status -S reports conflicted rebase' '
+ git reset --hard HEAD &&
+ git checkout B^0 &&
+ test_must_fail git rebase C &&
+ status_has_only conflicted rebase
+'
+
+test_expect_success 'git rebase --abort cleans up rebase status' '
+ git rebase --abort &&
+ status_has_only
+'
+
+test_expect_success 'status -S reports incomplete cherry-pick' '
+ git reset --hard HEAD &&
+ git checkout A &&
+ git cherry-pick --no-commit C &&
+ status_has_only commit-pending
+'
+
+test_expect_success 'completing commit cleans up pending commit status' '
+ git commit -mcompleted &&
+ status_has_only
+'
+
+test_expect_success 'status -S reports failed cherry-pick' '
+ git reset --hard HEAD &&
+ git checkout B &&
+ test_must_fail git cherry-pick C &&
+ status_has_only cherry-pick commit-pending conflicted
+'
+
+test_expect_success 'resolved conflicts clear conflicted status' '
+ git add oneside &&
+ status_has_only cherry-pick commit-pending
+'
+
+test_expect_success 'aborted cherry-pick clears cherry-pick status' '
+ git cherry-pick --abort &&
+ status_has_only
+'
+
+test_expect_success 'conflicted rebase-interactive status' '
+ git reset --hard HEAD &&
+ git checkout B &&
+ test_must_fail git rebase -i C &&
+ status_has_only rebase-interactive conflicted commit-pending
+'
+
+test_expect_success 'bisect status' '
+ git reset --hard HEAD &&
+ git bisect start &&
+ status_has_only bisect
+'
+
+test_expect_success 'bisect-reset clears bisect status' '
+ git bisect reset &&
+ status_has_only
+'
+
+test_done
--
1.8.0.3.gde9c7d5.dirty
^ permalink raw reply related
* [PATCHv3 3/4] git-status: show short sequencer state
From: Phil Hord @ 2012-11-09 18:56 UTC (permalink / raw)
To: git
Cc: phil.hord, Jeff King, Junio C Hamano, konglu, Matthieu Moy,
Kong Lucien, Duperray Valentin, Jonas Franck, Nguy Thomas,
Phil Hord
In-Reply-To: <1352487385-5929-1-git-send-email-hordp@cisco.com>
Teach git-status to report the sequencer state in short form
using a new --sequencer (-S) switch. Output zero or more
simple state token strings indicating the deduced state of the
git sequencer.
Sequencer state info tokens are displayed in "short"
form. 'git status --short -S' will show the normal short
status including the sequencer tokens. 'git status -S'
without --short will show only the new sequencer information
tokens in whatever the requested format is.
State token strings which may be emitted and their meanings:
merge a merge is in progress
am an am is in progress
am-is-empty the am patch is empty
rebase a rebase is in progress
rebase-interactive an interactive rebase is in progress
cherry-pick a cherry-pick is in progress
bisect a bisect is in progress
conflicted there are unresolved conflicts
commit-pending a commit operation is waiting to be completed
splitting interactive rebase, commit is being split
I also considered adding these tokens, but I decided it was not
appropriate since these changes are not sequencer-related. But
it is possible I am being too short-sighted or have chosen the
switch name poorly.
changed-index Changes exist in the index
changed-files Changes exist in the working directory
untracked New files exist in the working directory
Signed-off-by: Phil Hord <hordp@cisco.com>
---
Documentation/git-status.txt | 20 ++++++++++++++++++++
builtin/commit.c | 14 ++++++++++++++
wt-status.c | 34 ++++++++++++++++++++++++++++++++++
wt-status.h | 7 +++++++
4 files changed, 75 insertions(+)
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 67e5f53..bdacf08 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -38,6 +38,26 @@ OPTIONS
across git versions and regardless of user configuration. See
below for details.
+-S::
+--sequence::
+ Show the git sequencer status. This shows zero or more words
+ describing the state of the git sequencer. If --short is also
+ given, the words are shown at the beginning of the short-format
+ display after the one-line branch information, if present. If
+ --short is not given, then only the sequencer words are shown
+ with no other status information.
++
+ merge a merge is in progress
+ am an am is in progress
+ am-is-empty the am patch is empty
+ rebase a rebase is in progress
+ rebase-interactive an interactive rebase is in progress
+ cherry-pick a cherry-pick is in progress
+ bisect a bisect is in progress
+ conflicted there are unresolved conflicts
+ commit-pending a commit operation is waiting to be completed
+ splitting interactive rebase, commit is being split
+
-u[<mode>]::
--untracked-files[=<mode>]::
Show untracked files.
diff --git a/builtin/commit.c b/builtin/commit.c
index a17a5df..bf16cc6 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1060,6 +1060,11 @@ static int parse_and_validate_options(int argc, const char *argv[],
if (s->null_termination && status_format == STATUS_FORMAT_LONG)
status_format = STATUS_FORMAT_PORCELAIN;
+ if (s->show_sequencer && status_format != STATUS_FORMAT_SHORT) {
+ s->show_sequencer = SHOW_SEQUENCER_ONLY;
+ if (status_format == STATUS_FORMAT_LONG)
+ status_format = STATUS_FORMAT_SHORT;
+ }
if (status_format != STATUS_FORMAT_LONG)
dry_run = 1;
@@ -1156,6 +1161,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)
N_("show status concisely"), STATUS_FORMAT_SHORT),
OPT_BOOLEAN('b', "branch", &s.show_branch,
N_("show branch information")),
+ OPT_SET_INT('S', "sequencer", &s.show_sequencer,
+ N_("show sequencer state information"), SHOW_SEQUENCER_YES),
OPT_SET_INT(0, "porcelain", &status_format,
N_("machine-readable output"),
STATUS_FORMAT_PORCELAIN),
@@ -1188,6 +1195,11 @@ int cmd_status(int argc, const char **argv, const char *prefix)
if (s.null_termination && status_format == STATUS_FORMAT_LONG)
status_format = STATUS_FORMAT_PORCELAIN;
+ if (s.show_sequencer && status_format != STATUS_FORMAT_SHORT) {
+ s.show_sequencer = SHOW_SEQUENCER_ONLY;
+ if (status_format == STATUS_FORMAT_LONG)
+ status_format = STATUS_FORMAT_SHORT;
+ }
handle_untracked_files_arg(&s);
if (show_ignored_in_status)
@@ -1384,6 +1396,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
OPT_SET_INT(0, "short", &status_format, N_("show status concisely"),
STATUS_FORMAT_SHORT),
OPT_BOOLEAN(0, "branch", &s.show_branch, N_("show branch information")),
+ OPT_SET_INT(0, "sequencer", &s.show_sequencer,
+ N_("show sequencer state information"), SHOW_SEQUENCER_YES),
OPT_SET_INT(0, "porcelain", &status_format,
N_("machine-readable output"), STATUS_FORMAT_PORCELAIN),
OPT_BOOLEAN('z', "null", &s.null_termination,
diff --git a/wt-status.c b/wt-status.c
index a888120..71da1fb 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1201,6 +1201,33 @@ static void wt_shortstatus_print_tracking(struct wt_status *s)
fputc(s->null_termination ? '\0' : '\n', s->fp);
}
+static void wt_print_token(struct wt_status *s, const char *token, int active)
+{
+ if (active) {
+ color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "## %s", prefix, token);
+ fputc(s->null_termination ? '\0' : '\n', s->fp);
+ }
+}
+
+static void wt_sequencer_print(struct wt_status *s)
+{
+ struct wt_status_state state;
+
+ wt_status_get_state(s, &state);
+
+ wt_print_token(s, "merge", state.merge_in_progress);
+ wt_print_token(s, "am", state.am_in_progress);
+ wt_print_token(s, "rebase", state.rebase_in_progress);
+ wt_print_token(s, "rebase-interactive", state.rebase_interactive_in_progress);
+ wt_print_token(s, "cherry-pick", state.cherry_pick_in_progress);
+ wt_print_token(s, "bisect", state.bisect_in_progress);
+ wt_print_token(s, "am-empty", state.am_empty_patch);
+
+ wt_print_token(s, "conflicted", state.has_unmerged);
+ wt_print_token(s, "commit-pending", state.commit_is_pending);
+ wt_print_token(s, "splitting", state.split_in_progress);
+}
+
void wt_shortstatus_print(struct wt_status *s)
{
int i;
@@ -1208,6 +1235,13 @@ void wt_shortstatus_print(struct wt_status *s)
if (s->show_branch)
wt_shortstatus_print_tracking(s);
+ if (s->show_sequencer)
+ {
+ wt_sequencer_print(s);
+ if (s->show_sequencer == SHOW_SEQUENCER_ONLY)
+ return;
+ }
+
for (i = 0; i < s->change.nr; i++) {
struct wt_status_change_data *d;
struct string_list_item *it;
diff --git a/wt-status.h b/wt-status.h
index 0b866a2..df4b36d 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -24,6 +24,12 @@ enum untracked_status_type {
SHOW_ALL_UNTRACKED_FILES
};
+enum sequencer_status_type {
+ SHOW_SEQUENCER_NO=0,
+ SHOW_SEQUENCER_YES,
+ SHOW_SEQUENCER_ONLY
+};
+
/* from where does this commit originate */
enum commit_whence {
FROM_COMMIT, /* normal */
@@ -59,6 +65,7 @@ struct wt_status {
unsigned colopts;
int null_termination;
int show_branch;
+ enum sequencer_status_type show_sequencer;
/* These are computed during processing of the individual sections */
int commitable;
--
1.8.0.3.gde9c7d5.dirty
^ permalink raw reply related
* [PATCHv3 2/4] wt-status: Teach sequencer advice to use get_state
From: Phil Hord @ 2012-11-09 18:56 UTC (permalink / raw)
To: git
Cc: phil.hord, Jeff King, Junio C Hamano, konglu, Matthieu Moy,
Kong Lucien, Duperray Valentin, Jonas Franck, Nguy Thomas,
Phil Hord
In-Reply-To: <1352487385-5929-1-git-send-email-hordp@cisco.com>
wt_status_print_state retrieves some sequencer state information via
wt_status_get_state, but other state information it deduces on its
own. Replace these "local knowledge" deductions with wt_status
variables so we can share more common code in the future.
---
wt-status.c | 16 +++++++++-------
wt-status.h | 3 +++
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 760f52b..a888120 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -781,7 +781,7 @@ static void show_merge_in_progress(struct wt_status *s,
struct wt_status_state *state,
const char *color)
{
- if (has_unmerged(s)) {
+ if (state->has_unmerged) {
status_printf_ln(s, color, _("You have unmerged paths."));
if (advice_status_hints)
status_printf_ln(s, color,
@@ -867,9 +867,7 @@ static void show_rebase_in_progress(struct wt_status *s,
struct wt_status_state *state,
const char *color)
{
- struct stat st;
-
- if (has_unmerged(s)) {
+ if (state->has_unmerged) {
status_printf_ln(s, color, _("You are currently rebasing."));
if (advice_status_hints) {
status_printf_ln(s, color,
@@ -879,12 +877,12 @@ static void show_rebase_in_progress(struct wt_status *s,
status_printf_ln(s, color,
_(" (use \"git rebase --abort\" to check out the original branch)"));
}
- } else if (state->rebase_in_progress || !stat(git_path("MERGE_MSG"), &st)) {
+ } else if (state->rebase_in_progress || state->commit_is_pending) {
status_printf_ln(s, color, _("You are currently rebasing."));
if (advice_status_hints)
status_printf_ln(s, color,
_(" (all conflicts fixed: run \"git rebase --continue\")"));
- } else if (split_commit_in_progress(s)) {
+ } else if (state->split_in_progress) {
status_printf_ln(s, color, _("You are currently splitting a commit during a rebase."));
if (advice_status_hints)
status_printf_ln(s, color,
@@ -907,7 +905,7 @@ static void show_cherry_pick_in_progress(struct wt_status *s,
{
status_printf_ln(s, color, _("You are currently cherry-picking."));
if (advice_status_hints) {
- if (has_unmerged(s))
+ if (state->has_unmerged)
status_printf_ln(s, color,
_(" (fix conflicts and run \"git commit\")"));
else
@@ -955,6 +953,10 @@ static void wt_status_get_state(struct wt_status *s , struct wt_status_state *st
}
if (!stat(git_path("BISECT_LOG"), &st))
state->bisect_in_progress = 1;
+
+ state->has_unmerged = has_unmerged(s);
+ state->split_in_progress = split_commit_in_progress(s);
+ state->commit_is_pending = !stat(git_path("MERGE_MSG"), &st);
}
static void wt_status_print_state(struct wt_status *s)
diff --git a/wt-status.h b/wt-status.h
index 236b41f..0b866a2 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -79,6 +79,9 @@ struct wt_status_state {
int rebase_interactive_in_progress;
int cherry_pick_in_progress;
int bisect_in_progress;
+ int split_in_progress;
+ int has_unmerged;
+ int commit_is_pending;
};
void wt_status_prepare(struct wt_status *s);
--
1.8.0.3.gde9c7d5.dirty
^ permalink raw reply related
* [PATCHv3 1/4] Refactor print_state into get_state
From: Phil Hord @ 2012-11-09 18:56 UTC (permalink / raw)
To: git
Cc: phil.hord, Jeff King, Junio C Hamano, konglu, Matthieu Moy,
Kong Lucien, Duperray Valentin, Jonas Franck, Nguy Thomas,
Phil Hord
In-Reply-To: <1352487385-5929-1-git-send-email-hordp@cisco.com>
Recently git-status learned to display the state of the git
sequencer in long form to help the user remember an interrupted
command. This information is useful to other callers who do
not want it printed in the same way.
Split the new print_state function into separate get_state and
print_state functions so others can get this state info and
share common code.
Signed-off-by: Phil Hord <hordp@cisco.com>
---
wt-status.c | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 2a9658b..760f52b 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -928,34 +928,41 @@ static void show_bisect_in_progress(struct wt_status *s,
wt_status_print_trailer(s);
}
-static void wt_status_print_state(struct wt_status *s)
+static void wt_status_get_state(struct wt_status *s , struct wt_status_state *state)
{
- const char *state_color = color(WT_STATUS_HEADER, s);
- struct wt_status_state state;
struct stat st;
- memset(&state, 0, sizeof(state));
+ memset(state, 0, sizeof(*state));
+ /* Determine sequencer activity */
if (!stat(git_path("MERGE_HEAD"), &st)) {
- state.merge_in_progress = 1;
+ state->merge_in_progress = 1;
} else if (!stat(git_path("rebase-apply"), &st)) {
if (!stat(git_path("rebase-apply/applying"), &st)) {
- state.am_in_progress = 1;
+ state->am_in_progress = 1;
if (!stat(git_path("rebase-apply/patch"), &st) && !st.st_size)
- state.am_empty_patch = 1;
+ state->am_empty_patch = 1;
} else {
- state.rebase_in_progress = 1;
+ state->rebase_in_progress = 1;
}
} else if (!stat(git_path("rebase-merge"), &st)) {
if (!stat(git_path("rebase-merge/interactive"), &st))
- state.rebase_interactive_in_progress = 1;
+ state->rebase_interactive_in_progress = 1;
else
- state.rebase_in_progress = 1;
+ state->rebase_in_progress = 1;
} else if (!stat(git_path("CHERRY_PICK_HEAD"), &st)) {
- state.cherry_pick_in_progress = 1;
+ state->cherry_pick_in_progress = 1;
}
if (!stat(git_path("BISECT_LOG"), &st))
- state.bisect_in_progress = 1;
+ state->bisect_in_progress = 1;
+}
+
+static void wt_status_print_state(struct wt_status *s)
+{
+ const char *state_color = color(WT_STATUS_HEADER, s);
+ struct wt_status_state state;
+
+ wt_status_get_state(s, &state);
if (state.merge_in_progress)
show_merge_in_progress(s, &state, state_color);
--
1.8.0.3.gde9c7d5.dirty
^ permalink raw reply related
* [PATCHv3 0/4] git-status short sequencer state info
From: Phil Hord @ 2012-11-09 18:56 UTC (permalink / raw)
To: git
Cc: phil.hord, Jeff King, Junio C Hamano, konglu, Matthieu Moy,
Kong Lucien, Duperray Valentin, Jonas Franck, Nguy Thomas
In-Reply-To: <1351553513-20385-1-git-send-email-hordp@cisco.com>
I think this series is fairly complete at this point. I am still
missing some tests in 4/4, but only because I am not sure how to
induce those conditions. Maybe I should enlist help from $(git-blame).
[PATCHv3 1/4] Refactor print_state into get_state
[PATCHv3 2/4] wt-status: More state retrieval abstraction
[PATCHv3 3/4] git-status: show short sequencer state
[PATCHv3 4/4] Add tests for git-status --sequencer
^ permalink raw reply
* Re: git commit/push can fail silently when clone omits ".git"
From: Heiko Voigt @ 2012-11-09 18:42 UTC (permalink / raw)
To: Jeff King; +Cc: Jeffrey S. Haemer, Jens Lehmann, Git Issues
In-Reply-To: <20121108185643.GN15560@sigill.intra.peff.net>
Hi,
On Thu, Nov 08, 2012 at 01:56:43PM -0500, Jeff King wrote:
> Unfortunately, the patch below which does that seems to make t7407 very
> unhappy. It looks like the submodule test uses "git clone ." and
> "git-submodule add" expects the "/." to still be at the end of the
> configured URL when processing relative submodule paths. I'm not sure if
> that is important, or an unnecessary brittleness in the submodule code.
>
> Jens, Heiko?
After some analysis it seems to me that the test deviates from the
expected behavior. For relative urls we have documented that if we have
a remote in the superproject a relative submodule path is relative to that
remotes url.
In the test super has been cloned from ".". So the tests root directory
should be the directory the submodule path is relative to. That would
be ./submodule (since submodule is also in the root directory) and not
../submodule.
Before your patch a "/." was added to the origin of super and "/." is
currently counted as a path component.
So we have another corner case here: When your superproject was cloned
from "." the urls you currently have to specify with submodule add are
wrong (one ".." to much).
Since this is a change in behaviour I would like to further think about
the implications this brings if we fix this. Not sure how many people
clone from ".". The correct behavior (as documented) is the one you
introduce with your patch. If we decide to fix this we should also correct
the path calculation in git-submodule.sh.
Cheers Heiko
^ permalink raw reply
* Re: [PATCH v2 0/5] push: update remote tags only with force
From: Jeff King @ 2012-11-09 18:38 UTC (permalink / raw)
To: Chris Rorvick
Cc: git, Felipe Contreras, Michael Haggerty, Angelo Borsotti,
Philip Oakley, Johannes Sixt, Kacper Kornet
In-Reply-To: <1352084908-32333-1-git-send-email-chris@rorvick.com>
On Sun, Nov 04, 2012 at 09:08:23PM -0600, Chris Rorvick wrote:
> Patch series to prevent push from updating remote tags w/o forcing them.
> Split out original patch to ease review.
>
> Chris Rorvick (5):
> push: return reject reasons via a mask
> push: add advice for rejected tag reference
> push: flag updates
> push: flag updates that require force
> push: update remote tags only with force
>
> Documentation/git-push.txt | 10 +++++-----
> builtin/push.c | 24 +++++++++++++++---------
> builtin/send-pack.c | 6 ++++++
> cache.h | 7 ++++++-
> remote.c | 39 +++++++++++++++++++++++++++++++--------
> t/t5516-fetch-push.sh | 30 +++++++++++++++++++++++++++++-
> transport-helper.c | 6 ++++++
> transport.c | 25 +++++++++++++++----------
> transport.h | 10 ++++++----
> 9 files changed, 119 insertions(+), 38 deletions(-)
I have not looked carefully at this topic yet, but I did try merging it
to "pu" and found that it had some textual conflicts with the
nd/builtin-to-libgit topic, which moves some builtin/send-pack.c code to
send-pack.c. Since I am graduating that topic to master, I went ahead
and just rebased your topic on top.
If you do a re-roll, please use an updated master, and feel free to
grab (and double-check!) the rebase I am about to send out in 'pu'. I
also included the minor signed/unsigned pointer warning fixup in the
rebase, too.
-Peff
^ permalink raw reply
* Re: [PATCH v2 1/5] push: return reject reasons via a mask
From: Jeff King @ 2012-11-09 18:35 UTC (permalink / raw)
To: Chris Rorvick
Cc: git, Felipe Contreras, Michael Haggerty, Angelo Borsotti,
Philip Oakley, Johannes Sixt, Kacper Kornet
In-Reply-To: <1352084908-32333-2-git-send-email-chris@rorvick.com>
On Sun, Nov 04, 2012 at 09:08:24PM -0600, Chris Rorvick wrote:
> Pass all rejection reasons back from transport_push(). The logic is
> simpler and more flexible with regard to providing useful feedback.
> [...]
>
> void transport_print_push_status(const char *dest, struct ref *refs,
> - int verbose, int porcelain, int *nonfastforward);
> + int verbose, int porcelain, unsigned int *reject_mask);
You missed updating one call-site of this function in
builtin/send-pack.c (gcc -Wall will now complain of the signed/unsigned
mismatch in the passed-in pointer).
-Peff
^ permalink raw reply
* Re: git merge commits are non-deterministic? what changed?
From: Ulrich Spörlein @ 2012-11-09 18:27 UTC (permalink / raw)
To: Jeff King; +Cc: Matthieu Moy, Andreas Schwab, git
In-Reply-To: <20121109161647.GB19725@sigill.intra.peff.net>
On Fri, 2012-11-09 at 11:16:47 -0500, Jeff King wrote:
> On Fri, Nov 09, 2012 at 04:52:48PM +0100, Matthieu Moy wrote:
>
> > Ulrich Spörlein <uqs@spoerlein.net> writes:
> >
> > >> > 2. Why the hell is the commit hash dependent on the ordering of the
> > >> > parent commits? IMHO it should sort the set of parents before
> > >> > calculating the hash ...
> > >>
> > >> What would be the sort key?
> > >
> > > Trivially, the hash of the parents itself. So you'd always get
> > >
> > > ...
> > > parent 0000
> > > parent 1111
> > > parent aaaa
> > > parent ffff
> >
> > That would change the behavior of --first-parent. Or you'd need to
> > compute the sha1 of the sorted list, but keep the unsorted one in the
> > commit. Possible, but weird ;-).
>
> Right. The reason that merge parents are stored in the order given on
> the command line is not random or because it was not considered. It
> encodes a valuable piece of information: did the user merge "foo" into
> "bar", or did they merge "bar" into "foo"?
>
> So I think this discussion is going in the wrong direction; git should
> never sort the parents, because the order is meaningful. The original
> complaint was that a run of svn2git produced different results on two
> different git versions. The important question to me is: did svn2git
> feed the parents to git in the same order?
>
> If it did, and git produced different results, then that is a serious
> bug.
>
> If it did not, then the issue needs to be resolved in svn2git (which
> _may_ want to sort the parents that it feeds to git, but it would depend
> on whether the order it is currently presenting is meaningful).
Yeah, thanks, looks like I have some more work to do. I don't quite get
how it could come up with a different order, seeing that it is using svn
as the base.
Will run some more experiments, thanks for the info so far.
Cheers,
Uli
^ permalink raw reply
* Re: [PATCHv2] replace: parse revision argument for -d
From: Jeff King @ 2012-11-09 16:48 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git
In-Reply-To: <24b0f81315ddab8cc37133d5b3bec8aec90ed652.1351516888.git.git@drmicha.warpmail.net>
On Mon, Oct 29, 2012 at 02:23:27PM +0100, Michael J Gruber wrote:
> 'git replace' parses the revision arguments when it creates replacements
> (so that a sha1 can be abbreviated, e.g.) but not when deleting
> replacements.
>
> Make it parse the arguments to 'replace -d' in the same way.
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> v2 has the simplified error check as per Jeff, and a reworded message.
> Comes with a free test case, too.
I noticed this today in my pile of "to look at" patches. Sorry for being
slow.
> for (p = argv; *p; p++) {
> - if (snprintf(ref, sizeof(ref), "refs/replace/%s", *p)
> - >= sizeof(ref)) {
> - error("replace ref name too long: %.*s...", 50, *p);
> + q = *p;
> + if (get_sha1(q, sha1)) {
> + error("Failed to resolve '%s' as a valid ref.", q);
> had_error = 1;
> continue;
> }
Looks reasonable.
> + q = sha1_to_hex(sha1);
> + snprintf(ref, sizeof(ref), "refs/replace/%s", q);
> if (read_ref(ref, sha1)) {
> - error("replace ref '%s' not found.", *p);
> + error("replace ref '%s' not found.", q);
I worry a little about assuming that "q", which points to a static
internal buffer of sha1_to_hex, is still valid after calling read_ref.
We'll end up in resolve_ref, which might need to do considerable work
(e.g., loading the whole packed refs file). Just grepping for
sha1_to_hex, I don't think it is a problem currently, but it might be
worth copying the value (you could even point into the "ref" buffer to
avoid dealing with an extra allocation).
Other than that, it looks good to me.
-Peff
^ permalink raw reply
* Re: [PATCH v3 2/3] git-submodule foreach: export .gitmodules settings as variables
From: Heiko Voigt @ 2012-11-09 16:45 UTC (permalink / raw)
To: W. Trevor King
Cc: Git, Jeff King, Phil Hord, Shawn Pearce, Jens Lehmann, Nahor
In-Reply-To: <2121ce36cf4eb02385255cbd5b0bbd1dcc803113.1352431675.git.wking@tremily.us>
Hi,
On Thu, Nov 08, 2012 at 10:35:13PM -0500, W. Trevor King wrote:
> From: "W. Trevor King" <wking@tremily.us>
>
> This makes it easy to access per-submodule variables. For example,
>
> git submodule foreach 'git checkout $(git config --file $toplevel/.gitmodules submodule.$name.branch) && git pull'
>
> can now be reduced to
>
> git submodule foreach 'git checkout $submodule_branch && git pull'
What other use cases are there? Would the need for this maybe go away
once you had floating submodules following branches?
The whole thing looks like its adding some complex code which is not so
easy to read. I would like to make sure its worth it.
> diff --git a/git-submodule.sh b/git-submodule.sh
> index bc33112..e4d26f9 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -434,8 +434,24 @@ cmd_foreach()
> clear_local_git_env
> # we make $path available to scripts ...
> path=$sm_path
> +
> + # make all submodule variables available to scripts
> + eval $(
> + git config -f .gitmodules --get-regexp "^submodule\.${name}\..*" |
For completeness you should make the variables possible to override by
repository from the local repository configuration like all other
submodule options that are read directly from .gitmodules.
Cheers Heiko
^ permalink raw reply
* Re: [PATCH] gitweb: make remote_heads config setting work.
From: Jeff King @ 2012-11-09 16:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Phil Pennock, git
In-Reply-To: <7vk3tvqthw.fsf@alter.siamese.dyndns.org>
On Thu, Nov 08, 2012 at 08:40:11PM -0800, Junio C Hamano wrote:
> Looking at the code before this part:
>
> if (my ($hi, $mi, $lo) = ($key =~ /^([^.]*)\.(.*)\.([^.]*)$/)) {
> $key = join(".", lc($hi), $mi, lc($lo));
> } else {
> $key = lc($key);
> }
> $key =~ s/^gitweb\.//;
> return if ($key =~ m/\W/);
>
> the new code is munding the $hi and $mi parts, while the mistaken
> configuration this patch is trying to correct is about the $lo part,
> and possibly the $hi part, but never the $mi part.
Good catch. I think the "return" in the existing code suffers from the
same problem: it will bail on non-word characters in the $mi part, but
that part should allow arbitrary characters.
-Peff
^ permalink raw reply
* Re: git-clone and unreliable links?
From: Sitaram Chamarty @ 2012-11-09 16:35 UTC (permalink / raw)
To: Shawn Pearce; +Cc: Josef Wolf, git
In-Reply-To: <CAJo=hJtJPnQFjvz8AAQjf5Rze-_99vF_tYi9CqJ7fiW245Dv1w@mail.gmail.com>
On Wed, Nov 7, 2012 at 9:24 PM, Shawn Pearce <spearce@spearce.org> wrote:
> On Wed, Nov 7, 2012 at 7:35 AM, Josef Wolf <jw@raven.inka.de> wrote:
>> When using git-clone over an unreliable link (say, UMTS) and the network goes
>> down, git-clone deletes everything what was downloaded. When the network goes
>> up again and you restart git-clone, it has to start over from the
>> beginning. Then, eventually, the network goes down again, and everything is
>> deleted again.
>>
>> Is there a way to omit the deleting step, so the second invocation would start
>> where the first invocation was interrupted?
>
> No, because a clone is not resumable.
>
> The best way to obtain a repository over an unstable link is to ask
> the repository owner to make a bundle file with `git bundle create
> --heads --tags` and serve the file using standard HTTP or rsync, which
> are resumable protocols. After you download the file, you can clone or
> fetch from the bundle to initialize your local repository, and then
> run git fetch to incrementally update to anything that is more recent
> than the bundle's creation.
If the server is running gitolite, the admin can set it up so that a
bundle file is automatically created as needed (including "don't do it
more than once per <duration>" logic), and serve it up over rsync
using the same ssh credentials as for access to the repo itself.
However, this is not particularly useful for systems with git://,
although it could certainly be *adapted* for http access.
[Documentation is inline, in src/commands/rsync, for people who wish to know.]
--
Sitaram
^ permalink raw reply
* Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option
From: Heiko Voigt @ 2012-11-09 16:29 UTC (permalink / raw)
To: Junio C Hamano
Cc: W. Trevor King, Git, Jeff King, Phil Hord, Shawn Pearce,
Jens Lehmann, Nahor
In-Reply-To: <7v390jqlep.fsf@alter.siamese.dyndns.org>
Hi,
On Thu, Nov 08, 2012 at 11:34:54PM -0800, Junio C Hamano wrote:
> "W. Trevor King" <wking@tremily.us> writes:
>
> > By remaining agnostic on the variable usage, this patch makes
> > submodule setup more convenient for all parties.
>
> I personally do not think "remaining agnostic on the usage" is a
> good thing, at least for any option to commands at the higher level
> on the stack, such as "git submodule". I am afraid that giving an
> easier way to set up a variable with undefined semantics may make
> setup more confusing for all parties. One party gives one specific
> meaning to the field, while another party uses it for something
> slightly different.
>
> I would not object to "git config submodule.$name.branch $value", on
> the other hand. "git config" can be used to set a piece of data
> that has specific meaning, but as a low-level tool, it is not
> _limited_ to variables that have defined meaning.
I think we should agree on a behavior for this option and implement it
the same time when add learns about it. When we were discussing floating
submodules as an important option for the gerrit people I already started
to implement a proof of concept. Please have a look here:
https://github.com/hvoigt/git/commits/hv/floating_submodules
AFAIK this does not yet implement the same behaviour the gerrit tools
offer for this option. The main reason behind that was because I do not
know the typical workflow behind such an option. So I am open to
changes.
Maybe you can use or base your work on this implementation for submodule
update.
Without submodule update using this option I think it would be better to
implement this option in the tool you are using instead of submodule add.
Everything else feels incomplete to me.
Cheers Heiko
^ permalink raw reply
* Re: bash completion of "addable" files for `git add`
From: Jeff King @ 2012-11-09 16:27 UTC (permalink / raw)
To: Andreas Zeidler; +Cc: git, gitster
In-Reply-To: <5E69B894-C392-4DD5-A4F1-723DA1A3D059@zitc.de>
On Fri, Nov 09, 2012 at 02:22:27PM +0100, Andreas Zeidler wrote:
> so here's a patch adding bash completion on `git add` for modified,
> updated and untracked files. i've also set up a pull request — before
> i found `Documentation/SubmittingPatches`. fwiw, it's at
> https://github.com/git/git/pull/29
Please put cover letter material like this after the "---" divider, or
include a "-- >8 --" scissors line before your commit. Either helps "git
am" realize which content should go into the commit message.
> From cbac6caee7e788569562cb7138eb698cc46a1b8f Mon Sep 17 00:00:00 2001
> From: Andreas Zeidler <az@zitc.de>
> Date: Fri, 9 Nov 2012 13:05:43 +0100
Please omit these lines, as they are redundant with your email header.
> Subject: [PATCH] add bash completion for "addable" files
This one is useful, but it would be even better if it were the subject
of your email. :)
> +__git_addable ()
> +{
> + local dir="$(__gitdir)"
> + if [ -d "$dir" ]; then
> + git --git-dir="$dir" status --short --untracked=all |\
> + egrep '^.[UM?] ' | sed 's/^.. //'
> + return
> + fi
> +}
You would want to use the stable, scriptable "--porcelain" output, so
the completion is not broken by future changes to the "--short" format.
However, I do not think using "git status" is the best option. It
computes three things:
1. The diff between HEAD and index.
2. The diff between index and working tree.
3. The list of untracked files.
But you only care about (2) and (3), so you are wasting time computing
(1). I think the list you want could be generated with:
git diff-files --name-only
git ls-files --exclude-standard -o
and then you do not need to worry about grep or sed at all.
> @@ -810,6 +820,11 @@ _git_add ()
> --ignore-errors --intent-to-add
> "
> return
> + ;;
> + *)
> + __gitcomp "$(__git_addable)"
> + return
> + ;;
I think you'd want to use __gitcomp_nl to handle filenames with spaces.
Speaking of which, the output of status (or of the commands I mentioned)
may have quoting applied to pathnames. I think that is not something we
handle very well right now in the completion, so it may not be worth
worrying about for this particular patch.
Other than those comments, I think the intent of your patch makes a lot
of sense.
-Peff
^ permalink raw reply
* Re: git merge commits are non-deterministic? what changed?
From: Jeff King @ 2012-11-09 16:16 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Ulrich Spörlein, Andreas Schwab, git
In-Reply-To: <vpq390idb8v.fsf@grenoble-inp.fr>
On Fri, Nov 09, 2012 at 04:52:48PM +0100, Matthieu Moy wrote:
> Ulrich Spörlein <uqs@spoerlein.net> writes:
>
> >> > 2. Why the hell is the commit hash dependent on the ordering of the
> >> > parent commits? IMHO it should sort the set of parents before
> >> > calculating the hash ...
> >>
> >> What would be the sort key?
> >
> > Trivially, the hash of the parents itself. So you'd always get
> >
> > ...
> > parent 0000
> > parent 1111
> > parent aaaa
> > parent ffff
>
> That would change the behavior of --first-parent. Or you'd need to
> compute the sha1 of the sorted list, but keep the unsorted one in the
> commit. Possible, but weird ;-).
Right. The reason that merge parents are stored in the order given on
the command line is not random or because it was not considered. It
encodes a valuable piece of information: did the user merge "foo" into
"bar", or did they merge "bar" into "foo"?
So I think this discussion is going in the wrong direction; git should
never sort the parents, because the order is meaningful. The original
complaint was that a run of svn2git produced different results on two
different git versions. The important question to me is: did svn2git
feed the parents to git in the same order?
If it did, and git produced different results, then that is a serious
bug.
If it did not, then the issue needs to be resolved in svn2git (which
_may_ want to sort the parents that it feeds to git, but it would depend
on whether the order it is currently presenting is meaningful).
-Peff
^ permalink raw reply
* Re: Rename edge case...
From: Jeff King @ 2012-11-09 16:09 UTC (permalink / raw)
To: John Szakmeister; +Cc: git
In-Reply-To: <CAEBDL5U+OSTCAqgWoApE_m21Nef24Wqvt78oB6qqV4oEvU0vXQ@mail.gmail.com>
On Fri, Nov 09, 2012 at 04:10:31AM -0500, John Szakmeister wrote:
> I've been browsing StackOverflow answering git-related questions, and
> ran across this one:
> <http://stackoverflow.com/questions/13300675/git-merge-rename-conflict>
>
> It's a bit of an interesting situation. The user did a couple of
> renames in a branch:
> foo.txt => fooOld.txt
> fooNew.txt => foo.txt
>
> Meanwhile, master had an update to fooNew.txt. When the user tried to
> merge master to the branch, it gave a merge conflict saying fooNew.txt
> was deleted, but master tried to update it.
>
> I was a bit surprised that git didn't follow the rename here, though I
> do understand why: git only sees it as a rename if the source
> disappears completely.
Right. If the source didn't go away, it would be a copy. We can do copy
detection, but it is not quite as obvious what a merge should do with a
copy (apply the change to the original? To the copy? In both places? You
would really want hunk-level copy detection for it to make any sense).
Usually git deals with this double-rename case through the use of
"break" or "rewrite" detection. We notice that the old "foo.txt" and the
new "foo.txt" do not look very much like each other, and break the
modification apart into an add and a delete. That makes each side
eligible for rename detection, and we can end up finding the pairs of
renames above.
So in theory it just as simple as a one-liner to turn on break-detection
in merge-recursive. Sadly, that only reveals more issues with how
merge-recursive handles renames. See this thread, which has pointers to
the breakages at the end:
http://thread.gmane.org/gmane.comp.version-control.git/169944
I've become convinced that the best way forward with merge-recursive is
to scrap and rewrite it. It tries to do things in a muddled order, which
makes it very brittle to changes like this. I think it needs to have an
internal representation of the tree that can represent all of the
conflicts, and then follow a few simple phases:
1. "structural" 3-way merge handling renames, breaks, typechanges,
etc. Each path in tree might show things like D/F conflicts, or it
might show content-level merges that still need to happen, even if
the content from those merges is not coming from the same paths in
the source trees.
2. Resolve content-level 3-way merges at each path.
3. Compare the proposed tree to the working tree and list any problems
(e.g., untracked files or local modifications that will be
overwritten).
Right now it tries to do these things interleaved as it processes paths,
and as a result we've had many bugs (e.g., the content-level merge
conflating the content originally at a path and something that was
renamed into place, and missing corner cases where we actually overwrite
untracked files that should be considered precious).
But that is just off the top of my head. I haven't looked at the topic
in quite a while (and I haven't even started working on any such
rewrite).
> So I played locally with a few ideas, and was surprised to find out
> that even breaking up the two renames into two separate commits git
> still didn't follow it.
Right, because the merge only looks at the end points. Try doing a
"diff -M" between your endpoints with and without "-B". We do not have
any double-renames in git.git, but you can find "-B" helping a similar
case: most of a file's content is moved elsewhere, but some small amount
remains. For example, try this in git.git, with and without -B:
git show -M --stat --summary --patch 043a449
It finds the rename only with "-B", which would help a merge (it also
makes the diff shorter and more readable, as you can see what was
changed as the content migrated to the new file).
-Peff
^ permalink raw reply
* Re: git merge commits are non-deterministic? what changed?
From: Matthieu Moy @ 2012-11-09 15:52 UTC (permalink / raw)
To: Ulrich Spörlein; +Cc: Andreas Schwab, git
In-Reply-To: <20121109154245.GP69724@acme.spoerlein.net>
Ulrich Spörlein <uqs@spoerlein.net> writes:
>> > 2. Why the hell is the commit hash dependent on the ordering of the
>> > parent commits? IMHO it should sort the set of parents before
>> > calculating the hash ...
>>
>> What would be the sort key?
>
> Trivially, the hash of the parents itself. So you'd always get
>
> ...
> parent 0000
> parent 1111
> parent aaaa
> parent ffff
That would change the behavior of --first-parent. Or you'd need to
compute the sha1 of the sorted list, but keep the unsorted one in the
commit. Possible, but weird ;-).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply
* Re: git merge commits are non-deterministic? what changed?
From: Ulrich Spörlein @ 2012-11-09 15:42 UTC (permalink / raw)
To: Andreas Schwab; +Cc: git
In-Reply-To: <m2y5iarf5s.fsf@igel.home>
On Fri, 2012-11-09 at 16:04:31 +0100, Andreas Schwab wrote:
> Ulrich Spörlein <uqs@spoerlein.net> writes:
>
> > Two questions:
> > 1. Can we impose a stable ordering of the commits being recorded in a
> > merge commit? Listing parents in chronological order or something like
> > that.
>
> The order is determined by the order the refs are given to git merge (or
> git commit-tree when using the plumbing).
>
> > 2. Why the hell is the commit hash dependent on the ordering of the
> > parent commits? IMHO it should sort the set of parents before
> > calculating the hash ...
>
> What would be the sort key?
Trivially, the hash of the parents itself. So you'd always get
...
parent 0000
parent 1111
parent aaaa
parent ffff
hth
Uli
^ permalink raw reply
* Re: git merge commits are non-deterministic? what changed?
From: Andreas Schwab @ 2012-11-09 15:04 UTC (permalink / raw)
To: Ulrich Spörlein; +Cc: git
In-Reply-To: <20121109133132.GK69724@acme.spoerlein.net>
Ulrich Spörlein <uqs@spoerlein.net> writes:
> Two questions:
> 1. Can we impose a stable ordering of the commits being recorded in a
> merge commit? Listing parents in chronological order or something like
> that.
The order is determined by the order the refs are given to git merge (or
git commit-tree when using the plumbing).
> 2. Why the hell is the commit hash dependent on the ordering of the
> parent commits? IMHO it should sort the set of parents before
> calculating the hash ...
What would be the sort key?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: RFD: fast-import is picky with author names (and maybe it should - but how much so?)
From: Felipe Contreras @ 2012-11-09 14:34 UTC (permalink / raw)
To: Michael J Gruber; +Cc: Jeff King, Git Mailing List
In-Reply-To: <509CCCBC.8010102@drmicha.warpmail.net>
On Fri, Nov 9, 2012 at 10:28 AM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> Hg seems to store just anything in the author field ("committer"). The
> various interfaces that are floating around do some behind-the-back
> conversion to git format. The more conversions they do, the better they
> seem to work (no erroring out) but I'm wondering whether it's really a
> good thing, or whether we should encourage a more diligent approach
> which requires a user to map non-conforming author names wilfully.
So you propose that when somebody does 'git clone hg::hg hg-git' the
thing should fail. I hope you don't think it's too unbecoming for me
to say that I disagree.
IMO it should be git fast-import the one that converts these bad
authors, not every single tool out there. Maybe throw a warning, but
that's all. Or maybe generate a list of bad authors ready to be filled
out. That way when a project is doing a real conversion, say, when
moving to git, they can run the conversion once and see which authors
are bad and not multiple times, each try taking longer than the next.
--
Felipe Contreras
^ permalink raw reply
* Re: Revert option for git add --patch
From: Bogolisk @ 2012-11-09 14:09 UTC (permalink / raw)
To: git
In-Reply-To: <EE89F0A1-1C07-4597-B654-035F657AD09F@me.com>
Jonathon Mah <jmah <at> me.com> writes:
>
> Nathan,
>
> I find myself performing similar actions to you: using git add -p to stage
hunks, sometimes editing the
> staged patch; and keeping mental notes of things I wanted to revert, sometimes
changing them in the editor
> in another window, and sometimes reverting them after the add session with git
checkout -p).
Other front-ends like Egg and Magit has been providing the ability to move hunks
back and forth, for a long time.
^ permalink raw reply
* git merge commits are non-deterministic? what changed?
From: Ulrich Spörlein @ 2012-11-09 13:31 UTC (permalink / raw)
To: git
Hi all,
I'm running a couple of conversions from SVN to git, using a slightly
hacked version of svn2git (because it can cope with multiple branches
and is several orders of magnitude faster than git-svn).
Anyway, when doing some verification runs, using the same version of
svn2git, but different versions of git, I get different commit hashes,
and I tracked it down to the ordering of the parents inside a merge
commit.
version 1.7.9.2
% git show --format=raw e209a83|head
commit e209a83c1e0a387c88a44f3a8f2be2670ed85eae
tree de2d7c6726a45428d4a310da2acd8839daf9f85f
parent 5fba0401c23a594e4ad5e807bf14a5439645a358
parent 25062ba061871945759b3baa833fe64969383e40
parent 89bebeef185ed08424fc548f8569081c6add2439
parent c7d5f60d3a7e2e3c4da23b157c62504667344438
parent e7bc108f0d6a394050818a4af64a59094d3c793e
parent 48231afadc40013e6bfda56b04a11ee3a602598f
author rgrimes <rgrimes@FreeBSD.org> 739897097 +0000
committer rgrimes <rgrimes@FreeBSD.org> 739897097 +0000
vs
git version 1.8.0
% git show --format=raw 42f0fad|head
commit 42f0fadccab6eefc7ffdc1012345b42ad45e36c2
tree de2d7c6726a45428d4a310da2acd8839daf9f85f
parent 5fba0401c23a594e4ad5e807bf14a5439645a358
parent 25062ba061871945759b3baa833fe64969383e40
parent 89bebeef185ed08424fc548f8569081c6add2439
parent 48231afadc40013e6bfda56b04a11ee3a602598f
parent c7d5f60d3a7e2e3c4da23b157c62504667344438
parent e7bc108f0d6a394050818a4af64a59094d3c793e
author rgrimes <rgrimes@FreeBSD.org> 739897097 +0000
committer rgrimes <rgrimes@FreeBSD.org> 739897097 +0000
I haven't verified to see if that ordering is stable within a git
version, but the fact that it changed across versions clearly means that
I cannot depend on this currently (I have never seen this problem in two
years, so I blame git 1.8.0 ...)
Two questions:
1. Can we impose a stable ordering of the commits being recorded in a
merge commit? Listing parents in chronological order or something like
that.
2. Why the hell is the commit hash dependent on the ordering of the
parent commits? IMHO it should sort the set of parents before
calculating the hash ...
Help?
Uli
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox