Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Work around sed portability issue in t8006-blame-textconv
From: Junio C Hamano @ 2012-01-06 22:53 UTC (permalink / raw)
  To: Ben Walton; +Cc: git
In-Reply-To: <7vd3b0vc6h.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Ben Walton <bwalton@artsci.utoronto.ca> writes:
>
>> In test 'blame --textconv with local changes' of t8006-blame-textconv,
>> using /usr/xpg4/bin/sed on Solaris as set by SANE_TOOL_PATH, an
>> additional newline was added to the output from the 'helper' script
>> driven by git attributes.
>>
>> This was noted by sed with a message such as:
>> sed: Missing newline at end of file zero.bin.
>>
>> In turn, this was triggering a fatal error from git blame:
>> fatal: unable to read files to diff
>
> Interesting. A file with incomplete line technically is not a text file
> and sed is supposed to work on text files, so it is allowed to be picky.
>
>> Use perl -p -e instead of sed -e to work around this portability issue
>> as it will not insert the newline.
>
> I am not sure if additional newline is the problem, or the exit status
> from sed is, from your description. Your first paragraph says you will get
> output from sed but with an extra newline, and then later you said blame
> noticed an error in its attempt to read the contents. I am suspecting that
> it checked the exit status from the textconv subprocess and noticed the
> error and that is the cause of the issue, but could you clarify?  IOW, I
> am suspecting that replacing "as it will not insert the newline" with "as
> it does not error out on an incomplete line" is necessary in this
> sentence.

Ping?

^ permalink raw reply

* Re: [PATCH 1/2] daemon: add tests
From: Junio C Hamano @ 2012-01-06 22:49 UTC (permalink / raw)
  To: Clemens Buchacher
  Cc: Jeff King, git, Jonathan Nieder, Erik Faye-Lund, Ilari Liusvaara,
	Nguyễn Thái Ngọc Duy
In-Reply-To: <20120106194800.GA9301@ecki.lan>

Clemens Buchacher <drizzd@aon.at> writes:

> I have rebased Junio's cb/git-daemon-tests onto your
> jk/child-cleanup and replaced the call to pkill with a regular kill
> command.
>
> On top of that, I have added two commits to fix the discussed race
> condition. I also verified that the race condition actually happens
> by adding an artificial delay in the daemon (this change is
> obviously not included).
>
> I pushed the new cb/git-daemon-tests to
> https://github.com/drizzd/git . If you have no objections I will
> post the entire series including your run-command and send-pack
> patches to the list.

Looked fine except that some patches seem to lack enough justification
(justification in Peff's reply was good enough).

I actually was thinking that the previous round was good enough (perhaps
dropping the "pkill" bit altogether and replacing it with "kill" on the
daemon process itself, if OSX folks complain loudly), so it is in "next"
already, but it seems that the best course of action would be to drop it
and queue your re-roll afresh, aiming for the next cycle.

Thanks.

^ permalink raw reply

* Re: [PATCH] parse_object: try internal cache before reading object db
From: Jeff King @ 2012-01-06 22:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, git-dev
In-Reply-To: <7vmxa0ih6s.fsf@alter.siamese.dyndns.org>

On Fri, Jan 06, 2012 at 02:45:15PM -0800, Junio C Hamano wrote:

> > Did you want to leave the parse_object optimization until next cycle,
> > too? It's not loosening checks, but it's such a core piece of code that
> > it makes me nervous somebody somewhere is abusing "struct object" in a
> > way that will break it.
> 
> I was just updating the "What's cooking" report and my current thinking is
> that we should keep all three in "next" to give it a bit of exposure for
> now, and merge them to "master" early in the 1.7.10 cycle.

That sounds perfect. Thanks.

-Peff

^ permalink raw reply

* Re: [PATCH] parse_object: try internal cache before reading object db
From: Junio C Hamano @ 2012-01-06 22:45 UTC (permalink / raw)
  To: Jeff King; +Cc: git, git-dev
In-Reply-To: <20120106223324.GB13106@sigill.intra.peff.net>

Jeff King <peff@peff.net> writes:

>> Even though it is a bit scary kind of loosening of sanity checks that I
>> hesitate to take at this late in the cycle, I think it makes sense. Let's
>> queue them on 'pu' and aim for the next cycle.
>
> Did you want to leave the parse_object optimization until next cycle,
> too? It's not loosening checks, but it's such a core piece of code that
> it makes me nervous somebody somewhere is abusing "struct object" in a
> way that will break it.

I was just updating the "What's cooking" report and my current thinking is
that we should keep all three in "next" to give it a bit of exposure for
now, and merge them to "master" early in the 1.7.10 cycle.

^ permalink raw reply

* Re: [PATCH] parse_object: try internal cache before reading object db
From: Jeff King @ 2012-01-06 22:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, git-dev
In-Reply-To: <7v8vlkjzcj.fsf@alter.siamese.dyndns.org>

On Fri, Jan 06, 2012 at 01:27:40PM -0800, Junio C Hamano wrote:

> > I don't know if it is really that worth it on top of the parse_object
> > optimization. It's almost negligible for the normal case...
> > ... OTOH, if you had some totally insane ref
> > structure, like 120K _unique_ refs (which would probably imply that
> > you're making one ref per commit or something silly like that. But hey,
> > people have suggested it in the past), then it could be a big
> > improvement.
> 
> Even though it is a bit scary kind of loosening of sanity checks that I
> hesitate to take at this late in the cycle, I think it makes sense. Let's
> queue them on 'pu' and aim for the next cycle.

Did you want to leave the parse_object optimization until next cycle,
too? It's not loosening checks, but it's such a core piece of code that
it makes me nervous somebody somewhere is abusing "struct object" in a
way that will break it.

-Peff

^ permalink raw reply

* Re: [PATCH 1/2] daemon: add tests
From: Jeff King @ 2012-01-06 22:32 UTC (permalink / raw)
  To: Clemens Buchacher
  Cc: Junio C Hamano, git, Jonathan Nieder, Erik Faye-Lund,
	Ilari Liusvaara, Nguyễn Thái Ngọc Duy
In-Reply-To: <20120106194800.GA9301@ecki.lan>

On Fri, Jan 06, 2012 at 08:48:00PM +0100, Clemens Buchacher wrote:

> I have rebased Junio's cb/git-daemon-tests onto your
> jk/child-cleanup and replaced the call to pkill with a regular kill
> command.

Looks pretty good from my cursory examination. I think you should fill
out the rationale for "kill dashed externals on exit" a bit. My
reasoning is that whether a git command is an internal or external
process is purely an implementation detail, and killing the git wrapper
should behave identically in both cases.

> On top of that, I have added two commits to fix the discussed race
> condition. I also verified that the race condition actually happens
> by adding an artificial delay in the daemon (this change is
> obviously not included).

Looks reasonable to me.

> I pushed the new cb/git-daemon-tests to
> https://github.com/drizzd/git . If you have no objections I will
> post the entire series including your run-command and send-pack
> patches to the list.

No objections here. Thanks for moving this forward.

-Peff

^ permalink raw reply

* [ANNOUNCE] Git 1.7.9-rc0
From: Junio C Hamano @ 2012-01-06 21:55 UTC (permalink / raw)
  To: git

A release candidate Git 1.7.9-rc0 is available for testing. This is
supposed to be almost feature-complete for the final release.

The release tarballs are found at:

    http://code.google.com/p/git-core/downloads/list

and their SHA-1 checksums are:

c4a04c92ce9a501ba11cfd0032b1f8371aa6536e  git-1.7.9.rc0.tar.gz
60593473ab1111e1bf5af5e491e370ff6a9e9e10  git-htmldocs-1.7.9.rc0.tar.gz
834eff04341ef5bf475654c7a9588d29ae15937c  git-manpages-1.7.9.rc0.tar.gz

Also the following public repositories all have a copy of the v1.7.9-rc0
tag and the master branch that the tag points at:

  url = git://repo.or.cz/alt-git.git
  url = https://code.google.com/p/git-core/
  url = git://git.sourceforge.jp/gitroot/git-core/git.git
  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
  url = https://github.com/gitster/git

Git v1.7.9 Release Notes (draft)
========================

Updates since v1.7.8
--------------------

 * gitk updates accumulated since early 2011.

 * git-gui updated to 0.16.0.

 * git-p4 (in contrib/) updates.

 * Git uses gettext to translate its most common interface messages
   into the user's language if translations are available and the
   locale is appropriately set. Distributors can drop in new PO files
   in po/ to add new translations.

 * The code to handle username/password for HTTP transaction used in
   "git push" & "git fetch" learned to talk "credential API" to
   external programs to cache or store them, to allow integration with
   platform native keychain mechanisms.

 * The prompted input in the terminal use our own getpass() replacement
   when possible. HTTP transactions used to ask username without echoing
   back what was typed, but with this change you will see it as you type.

 * The internal of "revert/cherry-pick" has been tweaked to prepare
   building more generic "sequencer" on top of the implementation that
   drives them.

 * "git add" learned to stream large files directly into a packfile
   instead of writing them into individual loose object files.

 * "git checkout -B <current branch> <elsewhere>" is a more intuitive
   way to spell "git reset --keep <elsewhere>".

 * "git checkout" and "git merge" learned "--no-overwrite-ignore" option
   to tell Git that untracked and ignored files are not expendable.

 * "git commit --amend" learned "--no-edit" option to say that the
   user is amending the tree being recorded, without updating the
   commit log message.

 * "git commit" and "git reset" re-learned the optimization to prime
   the cache-tree information in the index, which makes it faster to
   write a tree object out after the index entries are updated.

 * "git commit" detects and rejects an attempt to stuff NUL byte in
   the commit log message.

 * "git commit" learned "-S" to GPG-sign the commit; this can be shown
   with the "--show-signature" option to "git log".

 * fsck and prune are relatively lengthy operations that still go
   silent while making the end-user wait. They learned to give progress
   output like other slow operations.

 * The set of built-in function-header patterns for various languages
   knows MATLAB.

 * "git log --format='<format>'" learned new %g[nNeE] specifiers to
   show information from the reflog entries when warlking the reflog
   (i.e. with "-g").

 * "git pull" can be used to fetch and merge an annotated/signed tag,
   instead of the tip of a topic branch. The GPG signature from the
   signed tag is recorded in the resulting merge commit for later
   auditing.

 * "git log" learned "--show-signature" option to show the signed tag
   that was merged that is embedded in the merge commit. It also can
   show the signature made on the commit with "git commit -S".

 * "git branch --edit-description" can be used to add descriptive text
   to explain what a topic branch is about.

 * "git fmt-merge-msg" learned to take the branch description into
   account when preparing a merge summary that "git merge" records
   when merging a local branch.

 * "git request-pull" has been updated to convey more information
   useful for integrators to decide if a topic is worth merging and
   what is pulled is indeed what the requestor asked to pull,
   including:

   - the tip of the branch being requested to be merged;
   - the branch description describing what the topic is about;
   - the contents of the annotated tag, when requesting to pull a tag.

 * "git pull" learned to notice 'pull.rebase' configuration variable,
   which serves as a global fallback for setting 'branch.<name>.rebase'
   configuration variable per branch.

 * "git tag" learned "--cleanup" option to control how the whitespaces
   and empty lines in tag message are cleaned up.

 * "gitweb" learned to show side-by-side diff.

Also contains minor documentation updates and code clean-ups.


Fixes since v1.7.8
------------------

Unless otherwise noted, all the fixes since v1.7.8 in the maintenance
releases are contained in this release (see release notes to them for
details).

----------------------------------------------------------------

Changes since v1.7.8 are as follows:

Anders Kaseorg (2):
      gitk: Remove unused $cdate array
      gitk: Remember time zones from author and commit timestamps

Andrew Wong (1):
      rebase -i: interrupt rebase when "commit --amend" failed during "reword"

Bert Wesarg (14):
      git-gui: fix multi selected file operation
      git-gui: handle config booleans without value
      git-gui: add smart case search mode in searchbar
      git-gui: add regexp search mode to the searchbar
      git-gui: add search history to searchbar
      git-gui: fix unintended line break in message string
      git-gui: use "untracked" for files which are not known to git
      git-gui: new config to control staging of untracked files
      git-gui: fix display of path in browser title
      git-gui: use a tristate to control the case mode in the searchbar
      git-gui: span widgets over the full file output area in the blame view
      git-gui: include the file path in guitools confirmation dialog
      git-gui: make config gui.warndetachedcommit a boolean
      git-gui: don't warn for detached head when rebasing

Brandon Casey (2):
      t/t4131-apply-fake-ancestor.sh: fix broken test
      builtin/apply.c: report error on failure to recognize input

Brian Harring (1):
      fix hang in git fetch if pointed at a 0 length bundle

Carlos Martín Nieto (2):
      convert: track state in LF-to-CRLF filter
      clone: the -o option has nothing to do with <branch>

Clemens Buchacher (2):
      Documentation: read-tree --prefix works with existing subtrees
      t5550: repack everything into one file

Conrad Irwin (1):
      Update documentation for stripspace

Dejan Ribič (1):
      git-gui: fix spelling error in sshkey.tcl

Eric Wong (1):
      enable SO_KEEPALIVE for connected TCP sockets

Erik Faye-Lund (3):
      mingw: give waitpid the correct signature
      compat/setenv.c: update errno when erroring out
      compat/setenv.c: error if name contains '='

Gary Gibbons (5):
      git-p4: ensure submit clientPath exists before chdir
      git-p4: use absolute directory for PWD env var
      git-p4: fix test for unsupported P4 Client Views
      git-p4: sort client views by reverse View number
      git-p4: support single file p4 client view maps

Gustaf Hendeby (1):
      Add built-in diff patterns for MATLAB code

Jack Nagel (2):
      Documentation: fix formatting error in merge-options.txt
      Add MYMETA.json to perl/.gitignore

Jakub Narebski (7):
      gitweb: Refactor diff body line classification
      gitweb: Extract formatting of diff chunk header
      gitweb: Give side-by-side diff extra CSS styling
      t9500: Add test for handling incomplete lines in diff by gitweb
      t9500: Add basic sanity tests for side-by-side diff in gitweb
      gitweb: Use href(-replay=>1,...) for formats links in "commitdiff"
      gitweb: Fix fallback mode of to_utf8 subroutine

Jeff King (53):
      http: drop "local" member from request struct
      prune: handle --progress/no-progress
      reachable: per-object progress
      read-cache: let refresh_cache_ent pass up changed flags
      refresh_index: rename format variables
      refresh_index: make porcelain output more specific
      upload-archive: use start_command instead of fork
      archive: don't let remote clients get unreachable commits
      stripspace: fix outdated comment
      fetch: create status table using strbuf
      test-lib: add test_config_global variant
      t5550: fix typo
      introduce credentials API
      credential: add function for parsing url components
      http: use credential API to get passwords
      credential: apply helper config
      credential: add credential.*.username
      credential: make relevance of http path configurable
      docs: end-user documentation for the credential subsystem
      credentials: add "cache" helper
      compat/snprintf: don't look at va_list twice
      docs: mention "-k" for both forms of "git mv"
      mv: honor --verbose flag
      mv: make non-directory destination error more clear
      mv: improve overwrite warning
      mv: be quiet about overwriting
      strbuf: add strbuf_add*_urlencode
      imap-send: avoid buffer overflow
      imap-send: don't check return value of git_getpass
      move git_getpass to its own source file
      refactor git_getpass into generic prompt function
      add generic terminal prompt function
      credentials: add "store" helper
      prompt: use git_terminal_prompt
      t: add test harness for external credential helpers
      credential: use git_prompt instead of git_getpass
      Makefile: linux has /dev/tty
      Makefile: OS X has /dev/tty
      contrib: add credential helper for OS X Keychain
      drop "match" parameter from get_remote_heads
      t5500: give fully-qualified refs to fetch-pack
      fetch-pack: match refs exactly
      connect.c: drop path_match function
      t5540: test DAV push with authentication
      http-push: enable "proactive auth"
      blame: don't overflow time buffer
      test-lib: redirect stdin of tests
      use custom rename score during --follow
      pretty: give placeholders to reflog identity
      docs: brush up obsolete bits of git-fsck manpage
      make "git push -v" actually verbose
      commit, merge: initialize static strbuf
      remote-curl: don't pass back fake refs

Jelmer Vernooij (1):
      Fix an incorrect reference to --set-all.

Jens Lehmann (2):
      diff/status: print submodule path when looking for changes fails
      docs: describe behavior of relative submodule URLs

Joey Hess (1):
      write first for-merge ref to FETCH_HEAD first

Johan Herland (3):
      t9301: Fix testcase covering up a bug in fast-import's notes fanout handling
      t9301: Add 2nd testcase exposing bugs in fast-import's notes fanout handling
      fast-import: Fix incorrect fanout level when modifying existing notes refs

Johannes Sixt (3):
      Compatibility: declare strtoimax() under NO_STRTOUMAX
      Makefile: unix sockets may not available on some platforms
      t0090: be prepared that 'wc -l' writes leading blanks

Jonathan Nieder (15):
      gitk: Make vi-style keybindings more vi-like
      branch: allow a no-op "branch -M <current-branch> HEAD"
      Allow checkout -B <current-branch> to update the current branch
      test: add missing "&&" after echo command
      test: remove a porcelain test that hard-codes commit names
      t7501 (commit): modernize style
      test: commit --amend should honor --no-edit
      revert: give --continue handling its own function
      revert: allow cherry-pick --continue to commit before resuming
      revert: pass around rev-list args in already-parsed form
      revert: allow single-pick in the middle of cherry-pick sequence
      revert: do not remove state until sequence is finished
      Revert "reset: Make reset remove the sequencer state"
      revert: stop creating and removing sequencer-old directory
      test: errors preparing for a test are not special

Jonathon Mah (1):
      stash: Don't fail if work dir contains file named 'HEAD'

Junio C Hamano (65):
      branch: add read_branch_desc() helper function
      format-patch: use branch description in cover letter
      branch: teach --edit-description option
      request-pull: modernize style
      request-pull: state what commit to expect
      request-pull: use the branch description
      fmt-merge-msg: use branch.$name.description
      get_tree_entry(): do not call find_tree_entry() on an empty tree
      unpack_object_header_buffer(): clear the size field upon error
      write_pack_header(): a helper function
      create_tmp_packfile(): a helper function
      finish_tmp_packfile(): a helper function
      Split GPG interface into its own helper library
      merge: notice local merging of tags and keep it unwrapped
      fetch: allow "git fetch $there v1.0" to fetch a tag
      refs DWIMmery: use the same rule for both "git fetch" and others
      fmt-merge-msg: avoid early returns
      fmt-merge-msg: package options into a structure
      fmt-merge-msg: Add contents of merged tag in the merge message
      merge: make usage of commit->util more extensible
      merge: record tag objects without peeling in MERGE_HEAD
      request-pull: use the annotated tag contents
      commit: copy merged signed tags to headers of merge commit
      merge: force edit and no-ff mode when merging a tag object
      commit: teach --amend to carry forward extra headers
      commit-tree: update the command line parsing
      commit-tree: teach -m/-F options to read logs from elsewhere
      commit: teach --gpg-sign option
      log: --show-signature
      test "commit -S" and "log --show-signature"
      pretty: %G[?GS] placeholders
      receive-pack, fetch-pack: reject bogus pack that records objects twice
      pack-object: tolerate broken packs that have duplicated objects
      gpg-interface: allow use of a custom GPG binary
      csum-file: introduce sha1file_checkpoint
      bulk-checkin: replace fast-import based implementation
      Kick-off the 1.7.9 cycle
      checkout -m: no need to insist on having all 3 stages
      commit: honour --no-edit
      Update draft release notes for 1.7.9
      Git 1.7.6.5
      Git 1.7.7.5
      Update draft release notes for 1.7.8.1
      Update draft release notes to 1.7.9
      checkout_merged(): squelch false warning from some gcc
      request-pull: update the "pull" command generation logic
      lf_to_crlf_filter(): tell the caller we added "\n" when draining
      Update draft release notes to 1.7.9
      lf_to_crlf_filter(): resurrect CRLF->CRLF hack
      advice: Document that they all default to true
      request-pull: do not emit "tag" before the tagname
      Update draft release notes to 1.7.9
      commit: do not lose mergetag header when not amending
      Git 1.7.8.1
      Update draft release notes to 1.7.9
      Update draft release notes in preparation for 1.7.9-rc0
      Git 1.7.8.2
      Update draft release notes to 1.7.9
      verify_signed_buffer: fix stale comment
      commit --amend -S: strip existing gpgsig headers
      log-tree.c: small refactor in show_signature()
      log-tree: show mergetag in log --show-signature output
      log --show-signature: reword the common two-head merge case
      Git 1.7.8.3
      Git 1.7.9-rc0

Jürgen Kreileder (3):
      gitweb: Call to_utf8() on input string in chop_and_escape_str()
      gitweb: esc_html() site name for title in OPML
      gitweb: Output valid utf8 in git_blame_common('data')

Kato Kazuyoshi (2):
      gitweb: Add a feature to show side-by-side diff
      gitweb: Add navigation to select side-by-side diff

Kirill A. Shutemov (1):
      git-tag: introduce --cleanup option

Linus Torvalds (1):
      fetch: do not store peeled tag object names in FETCH_HEAD

Martin von Zweigbergk (11):
      gitk: Fix file highlight when run in subdirectory
      gitk: Fix "show origin of this line" with separate work tree
      gitk: Fix "blame parent commit" with separate work tree
      gitk: Fix "External diff" with separate work tree
      gitk: Put temporary directory inside .git
      gitk: Run 'git rev-parse --git-dir' only once
      gitk: Simplify calculation of gitdir
      gitk: Show modified files with separate work tree
      am: don't persist keepcr flag
      t3401: modernize style
      t3401: use test_commit in setup

Michael Haggerty (17):
      git symbolic-ref: documentation fix
      struct ref_entry: document name member
      refs: rename "refname" variables
      refs: rename parameters result -> sha1
      clear_ref_array(): rename from free_ref_array()
      is_refname_available(): remove the "quiet" argument
      parse_ref_line(): add docstring
      add_ref(): add docstring
      is_dup_ref(): extract function from sort_ref_array()
      refs: change signatures of get_packed_refs() and get_loose_refs()
      get_ref_dir(): change signature
      resolve_gitlink_ref(): improve docstring
      Pass a (ref_cache *) to the resolve_gitlink_*() helper functions
      resolve_gitlink_ref_recursive(): change to work with struct ref_cache
      repack_without_ref(): remove temporary
      create_ref_entry(): extract function from add_ref()
      add_ref(): take a (struct ref_entry *) parameter

Michael Schubert (2):
      builtin/commit: add missing '/' in help message
      builtin/log: remove redundant initialization

Mika Fischer (3):
      http.c: Use curl_multi_fdset to select on curl fds instead of just sleeping
      http.c: Use timeout suggested by curl instead of fixed 50ms timeout
      http.c: Rely on select instead of tracking whether data was received

Nguyễn Thái Ngọc Duy (20):
      tree-walk.c: do not leak internal structure in tree_entry_len()
      read_directory_recursive: reduce one indentation level
      tree_entry_interesting(): give meaningful names to return values
      tree_entry_interesting: make use of local pointer "item"
      fsck: return error code when verify_pack() goes wrong
      verify_packfile(): check as many object as possible in a pack
      fsck: avoid reading every object twice
      fsck: print progress
      prune: show progress while marking reachable objects
      Convert many resolve_ref() calls to read_ref*() and ref_exists()
      checkout,merge: loosen overwriting untracked file check based on info/exclude
      checkout,merge: disallow overwriting ignored files with --no-overwrite-ignore
      Copy resolve_ref() return value for longer use
      revert: convert resolve_ref() to read_ref_full()
      Convert resolve_ref+xstrdup to new resolve_refdup function
      Rename resolve_ref() to resolve_ref_unsafe()
      merge: abort if fails to commit
      Convert commit_tree() to take strbuf as message
      commit_tree(): refuse commit messages that contain NULs
      Catch invalid --depth option passed to clone or fetch

Nick Alcock (2):
      Add strtoimax() compatibility function.
      Support sizes >=2G in various config options accepting 'g' sizes.

Pat Thoyts (11):
      git-gui: include the number of untracked files to stage when asking the user
      git-gui: theme the search and line-number entry fields on blame screen
      git-gui: catch invalid or complete regular expressions and treat as no match.
      git-gui: enable the smart case sensitive search only if gui.search.smartcase is true
      git-gui: set suitable extended window manager hints.
      git-gui: support underline style when parsing diff output
      git-gui: sort the numeric ansi codes
      git-gui: set whitespace warnings appropriate to this project
      git-gui: added config gui.gcwarning to disable the gc hint message
      git-gui: handle shell script text filters when loading for blame.
      git-gui 0.16

Paul Mackerras (1):
      gitk: Update copyright

Pete Harlan (1):
      Test 'checkout -m -- path'

Pete Wyckoff (18):
      git-p4: introduce skipSubmitEdit
      git-p4: submit test for auto-creating clientPath
      git-p4: test for absolute PWD problem
      git-p4: fix skipSubmitEdit regression
      rename git-p4 tests
      git-p4: introduce asciidoc documentation
      git-p4: clone does not use --git-dir
      git-p4: test cloning with two dirs, clarify doc
      git-p4: document and test clone --branch
      git-p4: honor --changesfile option and test
      git-p4: document and test --import-local
      git-p4: test --max-changes
      git-p4: test --keep-path
      git-p4: test and document --use-client-spec
      git-p4: document and test submit options
      git-p4: test client view handling
      git-p4: rewrite view handling
      git-p4: view spec documentation

Ramkumar Ramachandra (11):
      t3200 (branch): fix '&&' chaining
      test: fix '&&' chaining
      t3030 (merge-recursive): use test_expect_code
      t1510 (worktree): fix '&&' chaining
      t3040 (subprojects-basic): fix '&&' chaining, modernize style
      revert: free msg in format_todo()
      revert: make commit subjects in insn sheet optional
      revert: tolerate extra spaces, tabs in insn sheet
      revert: simplify getting commit subject in format_todo()
      t3510 (cherry-pick-sequencer): use exit status
      t3502, t3510: clarify cherry-pick -m failure

Ramsay Allan Jones (3):
      builtin/log.c: Fix an "Using plain integer as NULL pointer" warning
      environment.c: Fix an sparse "symbol not declared" warning
      fmt-merge-msg.c: Fix an "dubious one-bit signed bitfield" sparse error

Raphael Zimmerer (1):
      gitk: When a commit contains a note, mark it with a yellow box

René Scharfe (5):
      read-cache.c: allocate index entries individually
      cache.h: put single NUL at end of struct cache_entry
      use struct sha1_array in diff_tree_combined()
      pass struct commit to diff_tree_combined_merge()
      submodule: use diff_tree_combined_merge() instead of diff_tree_combined()

SZEDER Gábor (9):
      completion: document __gitcomp()
      completion: optimize refs completion
      completion: make refs completion consistent for local and remote repos
      completion: improve ls-remote output filtering in __git_refs()
      completion: support full refs from remote repositories
      completion: query only refs/heads/ in __git_refs_remotes()
      completion: improve ls-remote output filtering in __git_refs_remotes()
      completion: fast initial completion for config 'remote.*.fetch' value
      completion: remove broken dead code from __git_heads() and __git_tags()

Samuel Bronson (1):
      git-gui: Set both 16x16 and 32x32 icons on X to pacify Xming.

Sebastian Morr (1):
      Add MYMETA.yml to perl/.gitignore

Steven Walter (1):
      git-svn.perl: close the edit for propedits even with no mods

Thomas Jarosch (1):
      imap-send: Remove unused 'use_namespace' variable

Thomas Rast (13):
      userdiff: allow * between cpp funcname words
      Add test-scrap-cache-tree
      Test the current state of the cache-tree optimization
      Refactor cache_tree_update idiom from commit
      commit: write cache-tree data when writing index anyway
      reset: update cache-tree data when appropriate
      grep: load funcname patterns for -W
      grep: enable threading with -p and -W using lazy attribute lookup
      grep: disable threading in non-worktree case
      test-terminal: set output terminals to raw mode
      git-sh-setup: make require_clean_work_tree part of the interface
      bash completion: use read -r everywhere
      Documentation: rerere.enabled is the primary way to configure rerere

Tilman Vogel (1):
      git-gui: add config value gui.diffopts for passing additional diff options

Vincent van Ravesteijn (4):
      Compile fix for MSVC: Do not include sys/resources.h
      Compile fix for MSVC: Include <io.h>
      MSVC: Remove unneeded header stubs
      Show error for 'git merge' with unset merge.defaultToUpstream

Yggy King (1):
      gitk: Make "touching paths" search support backslashes

Ævar Arnfjörð Bjarmason (9):
      apply: get rid of useless x < 0 comparison on a size_t type
      cast variable in call to free() in builtin/diff.c and submodule.c
      pull: introduce a pull.rebase option to enable --rebase
      i18n: add infrastructure for translating Git with gettext
      t/t2023-checkout-m.sh: fix use of test_must_fail
      builtin/init-db.c: eliminate -Wformat warning on Solaris
      Fix an enum assignment issue spotted by Sun Studio
      Fix a bitwise negation assignment issue spotted by Sun Studio
      Appease Sun Studio by renaming "tmpfile"

^ permalink raw reply

* [ANNOUNCE] Git 1.7.8.3
From: Junio C Hamano @ 2012-01-06 21:53 UTC (permalink / raw)
  To: git

The latest maintenance release Git 1.7.8.3 is available.

The release tarballs are found at:

    http://code.google.com/p/git-core/downloads/list

and their SHA-1 checksums are:

e5eb8c289b69d69fd08c81b587a06eb5dd2b5c1c  git-1.7.8.3.tar.gz
8a65d2425c1b6f646d130cf5846e92e9e0e93736  git-htmldocs-1.7.8.3.tar.gz
a6e2b7cff8181ee52a1cc00ebba7b349850d6680  git-manpages-1.7.8.3.tar.gz

Also the following public repositories all have a copy of the v1.7.8.3
tag and the maint branch that the tag points at:

  url = git://repo.or.cz/alt-git.git
  url = https://code.google.com/p/git-core/
  url = git://git.sourceforge.jp/gitroot/git-core/git.git
  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
  url = https://github.com/gitster/git

----------------------------------------------------------------

Changes since v1.7.8.2 are as follows:

Brian Harring (1):
      fix hang in git fetch if pointed at a 0 length bundle

Clemens Buchacher (2):
      Documentation: read-tree --prefix works with existing subtrees
      t5550: repack everything into one file

Jack Nagel (1):
      Add MYMETA.json to perl/.gitignore

Jakub Narebski (1):
      gitweb: Fix fallback mode of to_utf8 subroutine

Jens Lehmann (1):
      docs: describe behavior of relative submodule URLs

Junio C Hamano (1):
      Git 1.7.8.3

Jürgen Kreileder (3):
      gitweb: Call to_utf8() on input string in chop_and_escape_str()
      gitweb: esc_html() site name for title in OPML
      gitweb: Output valid utf8 in git_blame_common('data')

Nguyễn Thái Ngọc Duy (1):
      Catch invalid --depth option passed to clone or fetch

Thomas Rast (1):
      Documentation: rerere.enabled is the primary way to configure rerere

^ permalink raw reply

* Re: [PATCH] parse_object: try internal cache before reading object db
From: Junio C Hamano @ 2012-01-06 21:27 UTC (permalink / raw)
  To: Jeff King; +Cc: git, git-dev
In-Reply-To: <20120106191654.GA11022@sigill.intra.peff.net>

Jeff King <peff@peff.net> writes:

> Actually, we can do much better than that. Here are a few patches that
> avoid parsing objects when possible. They drop the 3.4s to 2.0s. If you
> combine them with the parse_object optimization, my 120K case drops to
> around 0.68s.
>
> I don't know if it is really that worth it on top of the parse_object
> optimization. It's almost negligible for the normal case...
> ... OTOH, if you had some totally insane ref
> structure, like 120K _unique_ refs (which would probably imply that
> you're making one ref per commit or something silly like that. But hey,
> people have suggested it in the past), then it could be a big
> improvement.

Even though it is a bit scary kind of loosening of sanity checks that I
hesitate to take at this late in the cycle, I think it makes sense. Let's
queue them on 'pu' and aim for the next cycle.

^ permalink raw reply

* Re: [PATCH] Documentation: rerere.enabled overrides [ -d rr-cache ]
From: Junio C Hamano @ 2012-01-06 20:27 UTC (permalink / raw)
  To: Thomas Rast; +Cc: git
In-Reply-To: <f697b8eff63a8cdd1207c6bfd6b88c532832c6b5.1325855112.git.trast@student.ethz.ch>

Thomas Rast <trast@student.ethz.ch> writes:

> git-rerere(1) does not mention the rr-cache fallback; I decided not to
> touch it as it's a bit of an implementation detail.

It is not an implementation detail but is a (n old) part of the external
UI. Creating .git/rr-cache directory has been the only way to enable it
for quite a while (ever since it was first written as a Perl script early
2006, and the design even survived the rewrite in C late 2006). When the
configuration variable rerere.enabled was introduced with b4372ef (Enable
"git rerere" by the config variable rerere.enabled, 2007-07-06), we
deliberately kept the external interface compatible to avoid disruption.

And your "By default, ... is enabled if there is ... directory" below is
exactly the right description.

The manual page for "rerere" talks about "configuration variable
rerere.enabled"; perhaps it should also refer to git config manual page to
make it more discoverable?

> ... OTOH the
> auto-creation of rr-cache can cause strange behavior if a user has
> rerere.enabled unset and tries it once, as in
>
>   git config rerere.enabled true
>   git merge ...
>   git config --unset rerere.enabled

That is because the last one should be

	git config --bool rerere.enabled false

Perhaps the description for "--unset" option in the manual of "git config"
is not clear enough that there is a difference between a variable not
being set (i.e. we do not know anything about what the user wants) and a
variable explicitly set to false (i.e. we do know the user does not want
it)?  I doubt it, but you may want to check and clarify the section if
needed.

The patch itself looks good; it goes in the right direction.

Thanks.

>  Documentation/config.txt |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 68cf702..04f5e19 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1783,10 +1783,10 @@ rerere.autoupdate::
>  
>  rerere.enabled::
>  	Activate recording of resolved conflicts, so that identical
> -	conflict hunks can be resolved automatically, should they
> -	be encountered again.  linkgit:git-rerere[1] command is by
> -	default enabled if you create `rr-cache` directory under
> -	`$GIT_DIR`, but can be disabled by setting this option to false.
> +	conflict hunks can be resolved automatically, should they be
> +	encountered again.  By default, linkgit:git-rerere[1] is
> +	enabled if there is an `rr-cache` directory under the
> +	`$GIT_DIR`.
>  
>  sendemail.identity::
>  	A configuration identity. When given, causes values in the

^ permalink raw reply

* Re: Managing signed git tags and expiring keys
From: Junio C Hamano @ 2012-01-06 20:09 UTC (permalink / raw)
  To: Jonathan "Duke" Leto; +Cc: Git Users
In-Reply-To: <CABQG1aSY53-Z73CiUf2kstfaKLJ8zBGzu51CFdWHGiVR16JJ7w@mail.gmail.com>

"Jonathan \"Duke\" Leto" <jonathan@leto.net> writes:

> When the key changes, all existing tags are signed with the previous
> key in the chain of trust.
>
> Do people:
> 1) resign all the tags, causing people to overwrite their local tags
> 2) keep all versions of the keys in the chain of trust
> 3) something else more involved?
>
> Is anybody doing this currently?

Many kernel.org users (Linus and myself included) changed their signing
keys last year, so their project histories have tags signed with different
keys. I highly doubt anybody revoked old key and re-signed his tags with
new one.

^ permalink raw reply

* Re: [PATCH 1/2] daemon: add tests
From: Clemens Buchacher @ 2012-01-06 19:48 UTC (permalink / raw)
  To: Jeff King
  Cc: Junio C Hamano, git, Jonathan Nieder, Erik Faye-Lund,
	Ilari Liusvaara, Nguyễn Thái Ngọc Duy
In-Reply-To: <20120106155204.GA17355@sigill.intra.peff.net>

On Fri, Jan 06, 2012 at 10:52:04AM -0500, Jeff King wrote:
> > > 
> > >   run-command: optionally kill children on exit
> > >   https://github.com/peff/git/commit/5523d7ebf2a0386c9c61d7bfbc21375041df4989
> > 
> > Thanks, looks great. But if I add this on top (to enable this for
> > "git daemon"), then t0001 kills my entire X session. Not sure yet
> > what's going.
> 
> The fix is to move the recording of the PID up to a spot where we are
> certain that it's a real PID. Fixup patch is below, and I'll push a new
> version out to my github repo.

I have rebased Junio's cb/git-daemon-tests onto your
jk/child-cleanup and replaced the call to pkill with a regular kill
command.

On top of that, I have added two commits to fix the discussed race
condition. I also verified that the race condition actually happens
by adding an artificial delay in the daemon (this change is
obviously not included).

I pushed the new cb/git-daemon-tests to
https://github.com/drizzd/git . If you have no objections I will
post the entire series including your run-command and send-pack
patches to the list.

Clemens

^ permalink raw reply

* Re: [PATCH 3/3] write_head_info(): handle "extra refs" locally
From: Junio C Hamano @ 2012-01-06 19:45 UTC (permalink / raw)
  To: mhagger; +Cc: git, Jeff King, Jakub Narebski, Heiko Voigt, Johan Herland
In-Reply-To: <1325859153-31016-4-git-send-email-mhagger@alum.mit.edu>

mhagger@alum.mit.edu writes:

> From: Michael Haggerty <mhagger@alum.mit.edu>
>
> The old code basically did:
>
>      generate array of SHA1s for alternate refs
>      for each unique SHA1 in array:
>          add_extra_ref(".have", sha1)
>      for each ref (including real refs and extra refs):
>          show_ref(refname, sha1)
>
> But there is no need to stuff the alternate refs in extra_refs; we can
> call show_ref() directly when iterating over the array, then handle
> real refs separately.  So change the code to:
>
>      generate array of SHA1s for alternate refs
>      for each unique SHA1 in array:
>          show_ref(".have", sha1)
>      for each ref (this now only includes real refs):
>          show_ref(refname, sha1)

This updated logic should be equivalent to the old one as long as nobody
else called add_extra_ref() before we come to write_head_info() function,
which should hold true.

The entire series looks good. Thanks.

^ permalink raw reply

* [PATCH 2/2] upload-pack: avoid parsing tag destinations
From: Jeff King @ 2012-01-06 19:18 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, git-dev
In-Reply-To: <7vipkpn87d.fsf@alter.siamese.dyndns.org>

When upload-pack advertises refs, it dereferences any tags
it sees, and shows the resulting sha1 to the client. It does
this by calling deref_tag. That function must load and parse
each tag object to find the sha1 of the tagged object.
However, it also ends up parsing the tagged object itself,
which is not strictly necessary for upload-pack's use.

Each tag produces two object loads (assuming it is not a
recursive tag), when it could get away with only a single
one. Dropping the second load halves the effort we spend.

The downside is that we are no longer verifying the
resulting object by loading it. In particular:

  1. We never cross-check the "type" field given in the tag
     object with the type of the pointed-to object.  If the
     tag says it points to a tag but doesn't, then we will
     keep peeling and realize the error.  If the tag says it
     points to a non-tag but actually points to a tag, we
     will stop peeling and just advertise the pointed-to
     tag.

  2. If we are missing the pointed-to object, we will not
     realize (because we never even look it up in the object
     db).

However, both of these are errors in the object database,
and both will be detected if a client actually requests the
broken objects in question. So we are simply pushing the
verification away from the advertising stage, and down to
the actual fetching stage.

On my test repo with 120K refs, this drops the time to
advertise the refs from ~3.2s to ~2.0s.

Signed-off-by: Jeff King <peff@peff.net>
---
 tag.c         |   12 ++++++++++++
 tag.h         |    1 +
 upload-pack.c |    3 +--
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/tag.c b/tag.c
index 3aa186d..78d272b 100644
--- a/tag.c
+++ b/tag.c
@@ -24,6 +24,18 @@ struct object *deref_tag(struct object *o, const char *warn, int warnlen)
 	return o;
 }
 
+struct object *deref_tag_noverify(struct object *o)
+{
+	while (o && o->type == OBJ_TAG) {
+		o = parse_object(o->sha1);
+		if (o && o->type == OBJ_TAG && ((struct tag *)o)->tagged)
+			o = ((struct tag *)o)->tagged;
+		else
+			o = NULL;
+	}
+	return o;
+}
+
 struct tag *lookup_tag(const unsigned char *sha1)
 {
 	struct object *obj = lookup_object(sha1);
diff --git a/tag.h b/tag.h
index 5ee88e6..bc8a1e4 100644
--- a/tag.h
+++ b/tag.h
@@ -16,6 +16,7 @@ extern struct tag *lookup_tag(const unsigned char *sha1);
 extern int parse_tag_buffer(struct tag *item, const void *data, unsigned long size);
 extern int parse_tag(struct tag *item);
 extern struct object *deref_tag(struct object *, const char *, int);
+extern struct object *deref_tag_noverify(struct object *);
 extern size_t parse_signature(const char *buf, unsigned long size);
 
 #endif /* TAG_H */
diff --git a/upload-pack.c b/upload-pack.c
index 65cb0ff..c01e161 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -741,8 +741,7 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
 		nr_our_refs++;
 	}
 	if (o->type == OBJ_TAG) {
-		o = parse_object(o->sha1);
-		o = deref_tag(o, refname, 0);
+		o = deref_tag_noverify(o);
 		if (o)
 			packet_write(1, "%s %s^{}\n", sha1_to_hex(o->sha1), refname_nons);
 	}
-- 
1.7.6.5.14.g7b06f

^ permalink raw reply related

* [PATCH 1/2] upload-pack: avoid parsing objects during ref advertisement
From: Jeff King @ 2012-01-06 19:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, git-dev
In-Reply-To: <7vipkpn87d.fsf@alter.siamese.dyndns.org>

When we advertise a ref, the first thing we do is parse the
pointed-to object. This gives us two things:

  1. a "struct object" we can use to store flags

  2. the type of the object, so we know whether we need to
     dereference it as a tag

Instead, we can just use lookup_unknown_object to get an
object struct, and then fill in just the type field using
sha1_object_info (which, in the case of packed files, can
find the information without actually inflating the object
data).

This can save time if you have a large number of refs, and
the client isn't actually going to request those refs (e.g.,
because most of them are already up-to-date).

The downside is that we are no longer verifying objects that
we advertise by fully parsing them (however, we do still
know we actually have them, because sha1_object_info must
find them to get the type). While we might fail to detect a
corrupt object here, if the client actually fetches the
object, we will parse (and verify) it then.

On a repository with 120K refs, the advertisement portion of
upload-pack goes from ~3.4s to 3.2s (the failure to speed up
more is largely due to the fact that most of these refs are
tags, which need dereferenced to find the tag destination
anyway).

Signed-off-by: Jeff King <peff@peff.net>
---
 upload-pack.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/upload-pack.c b/upload-pack.c
index 6f36f62..65cb0ff 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -720,11 +720,14 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
 	static const char *capabilities = "multi_ack thin-pack side-band"
 		" side-band-64k ofs-delta shallow no-progress"
 		" include-tag multi_ack_detailed";
-	struct object *o = parse_object(sha1);
+	struct object *o = lookup_unknown_object(sha1);
 	const char *refname_nons = strip_namespace(refname);
 
-	if (!o)
-		die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));
+	if (o->type == OBJ_NONE) {
+		o->type = sha1_object_info(sha1, NULL);
+		if (o->type < 0)
+		    die("git upload-pack: cannot find object %s:", sha1_to_hex(sha1));
+	}
 
 	if (capabilities)
 		packet_write(1, "%s %s%c%s%s\n", sha1_to_hex(sha1), refname_nons,
@@ -738,6 +741,7 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
 		nr_our_refs++;
 	}
 	if (o->type == OBJ_TAG) {
+		o = parse_object(o->sha1);
 		o = deref_tag(o, refname, 0);
 		if (o)
 			packet_write(1, "%s %s^{}\n", sha1_to_hex(o->sha1), refname_nons);
-- 
1.7.6.5.14.g7b06f

^ permalink raw reply related

* Re: [PATCH] parse_object: try internal cache before reading object db
From: Jeff King @ 2012-01-06 19:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, git-dev
In-Reply-To: <7vipkpn87d.fsf@alter.siamese.dyndns.org>

On Thu, Jan 05, 2012 at 01:35:50PM -0800, Junio C Hamano wrote:

> > For example, GitHub's alternates repository for git.git has
> > ~120,000 refs, of which only ~3200 are unique. The time for
> > upload-pack to print its list of advertised refs dropped
> > from 3.4s to 0.76s.
> 
> Nice. I am more impressed by 120k/3.4 than 3.2k/0.76, though ;-)

Actually, we can do much better than that. Here are a few patches that
avoid parsing objects when possible. They drop the 3.4s to 2.0s. If you
combine them with the parse_object optimization, my 120K case drops to
around 0.68s.

I don't know if it is really that worth it on top of the parse_object
optimization. It's almost negligible for the normal case (though I get a
tiny speedup on my ~900-ref git.git repo), and a minor speedup on the
crazy alternates case. OTOH, if you had some totally insane ref
structure, like 120K _unique_ refs (which would probably imply that
you're making one ref per commit or something silly like that. But hey,
people have suggested it in the past), then it could be a big
improvement.

  [1/2]: upload-pack: avoid parsing objects during ref advertisement
  [2/2]: upload-pack: avoid parsing tag destinations

-Peff

^ permalink raw reply

* Re: [PATCH] xdiff: print post-image for common records instead of pre-image
From: Junio C Hamano @ 2012-01-06 19:10 UTC (permalink / raw)
  To: René Scharfe; +Cc: git, Joey Hess
In-Reply-To: <4F072B9C.1030005@lsrfire.ath.cx>

Thanks.

^ permalink raw reply

* Re: [PATCH] Submodules always use a relative path to gitdir
From: Junio C Hamano @ 2012-01-06 18:53 UTC (permalink / raw)
  To: Phil Hord; +Cc: Jens Lehmann, Antony Male, git, iveqy
In-Reply-To: <CABURp0rFOFfX7eu-v6ZK07iTfXwhOne60d70GkCdOvx0k8BZkQ@mail.gmail.com>

Phil Hord <phil.hord@gmail.com> writes:

> On Thu, Jan 5, 2012 at 7:11 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Jens Lehmann <Jens.Lehmann@web.de> writes:
>>> If not I'm fine with just setting core.worktree to a relative path in
>>> the git-submodule.sh script (like I did for the gitfile). And I'll look
>>> into teaching "git mv" about submodules right after that.
>>
>> ... teaching "git mv" may be a good move, I would think. I do think keeping
>> core.worktree pointing at the right directory is necessary, but I do not
>> see much point in making it a relative path, though.
>
> I do, in the case of submodules, as already discussed.

Of course you are right.

^ permalink raw reply

* Re: [PATCH v3] Limit refs to fetch to minimum in shallow clones
From: Junio C Hamano @ 2012-01-06 18:40 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git, Shawn O. Pearce
In-Reply-To: <1325833869-20078-1-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:

> The main purpose of shallow clones is to reduce download by only
> fetching objects up to a certain depth from the given refs. The number
> of objects depend on how many refs to follow. So:
>
>  - Only fetch HEAD or the ref specified by --branch
>  - Only fetch tags that reference to downloaded objects
>
> More tags/branches can be fetched later using git-fetch as usual.
>
> The old behaviour can still be called with --no-single-branch
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---

Thanks.

> @@ -179,6 +180,15 @@ objects from the source repository into a pack in the cloned repository.
>  	with a long history, and would want to send in fixes
>  	as patches.
>  
> +--single-branch::
> +--no-single-branch::
> +	These options are only valid when --depth is given.
> +	 `--single-branch` only fetches one branch (either HEAD or
> +	specified by --branch) and tags that point to the downloaded
> +	history. `--no-single-branch` fetches all branches and tags
> +	like in normal clones. `--single-branch` is implied by
> +	default.
> +

My first reaction after reading "is implied by default" was "Huh? didn't
we just read these kick in only when --depth is given?" and I had to read
it again. Here is my attempt to rephrase it.

        Clone only the history leading to the tip of a single branch,
        either specified by the `--branch` option or the primary branch
        remote's `HEAD` points at. When creating a shallow clone with the
        `--depth` option, this is the default, unless `--no-single-branch`
        is given to fetch the histories near the tips of all branches.

        Currently this option only works when creating a shallow clone and
        does not have any effect without the `--depth` option.

We might want to later enhance this to work also with a full-depth clone
that tracks only one branch, and the above phrasing would make it clear.

> +		if (!option_branch)
> +			remote_head = guess_remote_head(head, refs, 0);
> +		else {
> +			struct strbuf sb = STRBUF_INIT;
> +			strbuf_addstr(&sb, src_ref_prefix);
> +			strbuf_addstr(&sb, option_branch);
> +			remote_head = find_ref_by_name(refs, sb.buf);
> +			strbuf_release(&sb);
> +		}
> +
> +		if (!remote_head)
> +			die(_("Remote branch \"%s\" not found. Nothing to clone.\n"
> +			      "Try --no-single-branch to fetch all refs."),
> +			    option_branch ? option_branch : "HEAD");

Switching upon option_branch to tweak the message is a good idea, but
strictly speaking, we would hit this die() when guess_remote_head() does
not find where HEAD points at because it is detached, and in that case,
the error is not "Nothing to clone", but "We couldn't tell which branch
you meant to limit this cloning to".

> @@ -642,9 +679,12 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
>  
>  		transport_set_option(transport, TRANS_OPT_KEEP, "yes");
>  
> -		if (option_depth)
> +		if (option_depth) {
>  			transport_set_option(transport, TRANS_OPT_DEPTH,
>  					     option_depth);
> +			transport_set_option(transport, TRANS_OPT_FOLLOWTAGS,
> +					     option_single_branch ? "1" : NULL);

Curious. Does anybody set FOLLOWTAGS to the transport by default becore we
come here (just asking)?

^ permalink raw reply

* [PATCH] xdiff: print post-image for common records instead of pre-image
From: René Scharfe @ 2012-01-06 17:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Joey Hess
In-Reply-To: <7vlipx4q3r.fsf@alter.siamese.dyndns.org>

Normally it doesn't matter if we show the pre-image or th post-image
for the common parts of a diff because they are the same.  If
white-space changes are ignored they can differ, though.  The
new text after applying the diff is more interesting in that case,
so show that instead of the old contents.

Note: GNU diff shows the pre-image.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 t/t4015-diff-whitespace.sh |   14 +++++++-------
 xdiff/xemit.c              |   12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index 9059bcd..cc3db13 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -103,7 +103,7 @@ test_expect_success 'another test, with -w --ignore-space-at-eol' 'test_cmp expe
 git diff -w -b --ignore-space-at-eol > out
 test_expect_success 'another test, with -w -b --ignore-space-at-eol' 'test_cmp expect out'
 
-tr 'Q' '\015' << EOF > expect
+tr 'Q_' '\015 ' << EOF > expect
 diff --git a/x b/x
 index d99af23..8b32fb5 100644
 --- a/x
@@ -111,19 +111,19 @@ index d99af23..8b32fb5 100644
 @@ -1,6 +1,6 @@
 -whitespace at beginning
 +	whitespace at beginning
- whitespace change
+ whitespace 	 change
 -whitespace in the middle
 +white space in the middle
- whitespace at end
+ whitespace at end__
  unchanged line
- CR at endQ
+ CR at end
 EOF
 git diff -b > out
 test_expect_success 'another test, with -b' 'test_cmp expect out'
 git diff -b --ignore-space-at-eol > out
 test_expect_success 'another test, with -b --ignore-space-at-eol' 'test_cmp expect out'
 
-tr 'Q' '\015' << EOF > expect
+tr 'Q_' '\015 ' << EOF > expect
 diff --git a/x b/x
 index d99af23..8b32fb5 100644
 --- a/x
@@ -135,9 +135,9 @@ index d99af23..8b32fb5 100644
 +	whitespace at beginning
 +whitespace 	 change
 +white space in the middle
- whitespace at end
+ whitespace at end__
  unchanged line
- CR at endQ
+ CR at end
 EOF
 git diff --ignore-space-at-eol > out
 test_expect_success 'another test, with --ignore-space-at-eol' 'test_cmp expect out'
diff --git a/xdiff/xemit.c b/xdiff/xemit.c
index 2e669c3..d11dbf9 100644
--- a/xdiff/xemit.c
+++ b/xdiff/xemit.c
@@ -87,7 +87,7 @@ static long def_ff(const char *rec, long len, char *buf, long sz, void *priv)
 
 static int xdl_emit_common(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
                            xdemitconf_t const *xecfg) {
-	xdfile_t *xdf = &xe->xdf1;
+	xdfile_t *xdf = &xe->xdf2;
 	const char *rchg = xdf->rchg;
 	long ix;
 
@@ -204,8 +204,8 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
 		/*
 		 * Emit pre-context.
 		 */
-		for (; s1 < xch->i1; s1++)
-			if (xdl_emit_record(&xe->xdf1, s1, " ", ecb) < 0)
+		for (; s2 < xch->i2; s2++)
+			if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0)
 				return -1;
 
 		for (s1 = xch->i1, s2 = xch->i2;; xch = xch->next) {
@@ -213,7 +213,7 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
 			 * Merge previous with current change atom.
 			 */
 			for (; s1 < xch->i1 && s2 < xch->i2; s1++, s2++)
-				if (xdl_emit_record(&xe->xdf1, s1, " ", ecb) < 0)
+				if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0)
 					return -1;
 
 			/*
@@ -239,8 +239,8 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
 		/*
 		 * Emit post-context.
 		 */
-		for (s1 = xche->i1 + xche->chg1; s1 < e1; s1++)
-			if (xdl_emit_record(&xe->xdf1, s1, " ", ecb) < 0)
+		for (s2 = xche->i2 + xche->chg2; s2 < e2; s2++)
+			if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0)
 				return -1;
 	}
 
-- 
1.7.8.2

^ permalink raw reply related

* Aborting "git commit --interactive" discards updates to index (was: Re: [ANNOUNCE] Git 1.7.6)
From: demerphq @ 2012-01-06 16:37 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Ævar Arnfjörð Bjarmason

On 27 June 2011 17:59, Junio C Hamano <gitster@pobox.com> wrote:
> The latest feature release Git 1.7.6 is available at the usual
> places:
>
>  http://www.kernel.org/pub/software/scm/git/
[snip]
>  * Aborting "git commit --interactive" discards updates to the index
>   made during the interactive session.

Hi, I am wondering why this change was made?

I can sort of understand if people do CTL-C during an interactive
commit that throwing the results away might be useful (although I
don't see why personally), but what I don't understand at all is why
it happens when the "add --interactive" is completed properly, but the
user decided not to actually commit. For me and a number of colleagues
the normal reason we exit the commit part (that is exit the editor
without modifying the commit message) is because we realize we forgot
something, such as adding a new file, and want to exit out and re-add
it. I am writing this after spending about 45 minutes showing a
colleague how to use git commit --interactive, when we realized that
we had forgotten to add a file. Needless to say he wasn't too happy
about losing 45 minutes work and having to redo it.

The new behavior potentially means that a lot of work (such as via the
'e' option) is instantly discarded. I don't understand why this is
perceived to be sensible behavior -- I thought the default policy for
git would be to not lose work!

I would really like an git config option to revert to the previous
behavior of not throwing away what I staged, or even better have git
commit --interactive ask me what I want to do, after all, it is an
interactive process so it seems reasonable it asks before it does
something like throw away work.

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

^ permalink raw reply

* Re: [RFD] Handling of non-UTF8 data in gitweb
From: Jakub Narebski @ 2012-01-06 16:35 UTC (permalink / raw)
  To: git; +Cc: Jürgen Kreileder, John Hawley, Jeff King, Junio C Hamano
In-Reply-To: <201112041709.32212.jnareb@gmail.com>

On Sun, 4 Dec 2011, Jakub Narebski wrote:
> 
> Currently gitweb converts data it receives from git commands to Perl 
> internal utf8 representation via to_utf8() subroutine
[...]
> Each part of data must be handled separately.  It is quite error prone
> process, as can be seen from quite a number of patches that fix handling
> of UTF-8 data (latest from Jürgen).
> 
> 
> Much, much simpler would be to force opening of all files (including 
> output pipes from git commands) in ':utf8' mode:
> 
>   use open qw(:std :utf8);
> 
> [Note: perhaps instead of ':utf8' it should be ':encoding(UTF-8)' 
>  there...]
> 
> But doing this would change gitweb behavior.  [...]
[...]
> I don't know if people are relying on the old behavior.  I guess
> it could be emulated by defining our own 'utf-8-with-fallback'
> encoding, or by defining our own PerlIO layer with PerlIO::via.
> But it no longer be simple solution (though still automatic).

I have now created simple Encode::UTF8WithFallback module, so that

  use Encode::UTF8WithFallback;
  use open IN => ':encoding(utf8-with-fallback)';

should be able to replace all calls to to_utf8() without any change
in behavior; at least simple tests shows that.


There however are two problems with this solution:

1. Encode::UTF8WithFallback should really be a separate Perl module
   in a separate file (e.g. 'gitweb/lib/Encode/UTF8WithFallback.pm');
   I was not able to make it work without a separate file.

   This means that it very much requires the change that allows splitting
   gitweb into many files and/or load extra helper modules, and/or require
   extra non-core modules but provide and install them with gitweb if they
   are not available.  These changes are ready, and can be find in 

     'gitweb/split'
   
   branch in my git.git repositories:

     http://repo.or.cz/w/git/jnareb-git.git
     https://github.com/jnareb/git


2. It turned out that the "open" pragma 1.04 from Perl v5.8.6 does not
   work correctly.  We need at least "open" 1.06 (version 1.05 consists
   supposedly only of documentation-only change).

   Because "open" is a core Perl module (core pragma), this means that
   gitweb will require in practice Perl v5.8.9 at least, increasing
   version requirement from current v5.8.0
 
-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: [PATCH 1/2] daemon: add tests
From: Jeff King @ 2012-01-06 15:52 UTC (permalink / raw)
  To: Clemens Buchacher
  Cc: Junio C Hamano, git, Jonathan Nieder, Erik Faye-Lund,
	Ilari Liusvaara, Nguyễn Thái Ngọc Duy
In-Reply-To: <20120105160612.GA27251@ecki.lan>

On Thu, Jan 05, 2012 at 05:06:15PM +0100, Clemens Buchacher wrote:

> On Wed, Jan 04, 2012 at 09:55:59PM -0500, Jeff King wrote:
> > 
> > It so happens that I have just the patch you need. I've been meaning to
> > go over it again and submit it:
> > 
> >   run-command: optionally kill children on exit
> >   https://github.com/peff/git/commit/5523d7ebf2a0386c9c61d7bfbc21375041df4989
> 
> Thanks, looks great. But if I add this on top (to enable this for
> "git daemon"), then t0001 kills my entire X session. Not sure yet
> what's going.

Yikes. Thanks for noticing.

What happens is we have a failure case in start_command, set pid to -1,
and then fall through to the end of the function. So we end up marking
"-1" for cleanup, which attempts to kill all processes.

I never noticed it because it can only happen when fork() fails, or when
a child process signals an exec failure (which happens all the time with
aliases, but could not be triggered until your patch).

The fix is to move the recording of the PID up to a spot where we are
certain that it's a real PID. Fixup patch is below, and I'll push a new
version out to my github repo.

-Peff

diff --git a/run-command.c b/run-command.c
index aeb9c6e..614b722 100644
--- a/run-command.c
+++ b/run-command.c
@@ -353,6 +353,8 @@ fail_pipe:
 	if (cmd->pid < 0)
 		error("cannot fork() for %s: %s", cmd->argv[0],
 			strerror(failed_errno = errno));
+	else if (cmd->clean_on_exit)
+		mark_child_for_cleanup(cmd->pid);
 
 	/*
 	 * Wait for child's execvp. If the execvp succeeds (or if fork()
@@ -374,8 +376,6 @@ fail_pipe:
 	}
 	close(notify_pipe[0]);
 
-	if (cmd->clean_on_exit)
-		mark_child_for_cleanup(cmd->pid);
 }
 #else
 {

^ permalink raw reply related

* Re: [PATCH] Submodules always use a relative path to gitdir
From: Nguyen Thai Ngoc Duy @ 2012-01-06 15:07 UTC (permalink / raw)
  To: Phil Hord; +Cc: Junio C Hamano, Jens Lehmann, Antony Male, git, iveqy
In-Reply-To: <CABURp0rFOFfX7eu-v6ZK07iTfXwhOne60d70GkCdOvx0k8BZkQ@mail.gmail.com>

On Fri, Jan 6, 2012 at 9:26 PM, Phil Hord <phil.hord@gmail.com> wrote:
> Do you see any _problem_ with making core.worktree a relative
> directory in the specific case of git submodules?

Not a problem per se, but you should look at the comment at the top of
t1510 to see where it is relative to. Two interesting rules:

2. .git file is relative to parent directory. .git file is basically
   symlink in disguise. The directory where .git file points to will
   become new git_dir.

3. core.worktree is relative to git_dir.
-- 
Duy

^ permalink raw reply

* Re: [PATCH 0/3] Eliminate one user of extra_refs
From: Jeff King @ 2012-01-06 14:53 UTC (permalink / raw)
  To: mhagger; +Cc: Junio C Hamano, git, Jakub Narebski, Heiko Voigt, Johan Herland
In-Reply-To: <1325859153-31016-1-git-send-email-mhagger@alum.mit.edu>

On Fri, Jan 06, 2012 at 03:12:30PM +0100, mhagger@alum.mit.edu wrote:

> Receive pack currently uses "extra refs" to keep track of ".have"
> references, which in turn are used to tell the source the SHA1s of
> references that are already known to the repository via alternates.
> 
> But the code already creates an array holding the alternate SHA1s.  So
> just read the SHA1s out of this array rather then round-tripping them
> through the extra_refs mechanism.
> 
> This is one step towards hopefully abolishing extra_refs altogether.
> I still have to examine the other user.

Thanks, this is a nice simplification. The patches look good to me, and
they produce the same output for a simple test (I happened to be fiddling
with receive-pack and alternates yesterday, so I had a nice test case
right at hand :) ).

>   receive-pack: move more work into write_head_info()

BTW, I have a patch to make sending ".have" refs configurable[1] (it
adds a receive.advertiseAlternates config variable), which this patch
conflicts with. I don't think that is your problem, but I thought I
would mention it since you are working in the area. Is that something we
want in git?

-Peff

[1] We are using it at GitHub because our alternates repos are so huge
    that the overhead of advertising the refs outweighs the minor
    benefits you get from avoiding object transfer.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox