All of lore.kernel.org
 help / color / mirror / Atom feed
* What's cooking in git.git (Aug 2014, #01; Fri, 1)
@ 2014-08-01 22:01 Junio C Hamano
  2014-08-06  8:11 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2014-08-01 22:01 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking.  Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'.

First release candidate 2.1.0-rc1 expected early next week, after
merging a couple of obvious documentation update patches.

You can find the changes described here in the integration branches
of the repositories listed at

    http://git-blame.blogspot.com/p/git-public-repositories.html

--------------------------------------------------
[Graduated to "master"]

* ep/avoid-test-a-o (2014-07-25) 1 commit
  (merged to 'next' on 2014-07-27 at 45de31d)
 + t9814: fix misconversion from test $a -o $b to test $a || test $b

 Fix a post v2.0 regression in 'master'.


* jk/more-push-completion (2014-07-22) 3 commits
  (merged to 'next' on 2014-07-28 at d1d4c27)
 + completion: complete `git push --force-with-lease=`
 + completion: add some missing options to `git push`
 + completion: complete "unstuck" `git push --recurse-submodules`


* sk/mingw-tests-workaround (2014-07-21) 6 commits
  (merged to 'next' on 2014-07-28 at 2f3b7ac)
 + t800[12]: work around MSys limitation
 + t9902: mingw-specific fix for gitfile link files
 + t4210: skip command-line encoding tests on mingw
 + MinGW: disable legacy encoding tests
 + t0110/MinGW: skip tests that pass arbitrary bytes on the command line
 + MinGW: Skip test redirecting to fd 4
 (this branch is used by jc/not-mingw-cygwin.)

 Make tests pass on msysgit by mostly disabling ones that are
 infeasible on that platform.


* sk/mingw-uni-fix-more (2014-07-21) 14 commits
  (merged to 'next' on 2014-07-28 at 0945196)
 + Win32: enable color output in Windows cmd.exe
 + Win32: patch Windows environment on startup
 + Win32: keep the environment sorted
 + Win32: use low-level memory allocation during initialization
 + Win32: reduce environment array reallocations
 + Win32: don't copy the environment twice when spawning child processes
 + Win32: factor out environment block creation
 + Win32: unify environment function names
 + Win32: unify environment case-sensitivity
 + Win32: fix environment memory leaks
 + Win32: Unicode environment (incoming)
 + Win32: Unicode environment (outgoing)
 + Revert "Windows: teach getenv to do a case-sensitive search"
 + tests: do not pass iso8859-1 encoded parameter

 Most of these are battle-tested in msysgit and are needed to
 complete what has been merged to 'master' already.

--------------------------------------------------
[New Topics]

* jk/stash-list-p (2014-07-30) 7 commits
 - SQUASH??? future-proof, log --cc should imply -p without being told
 - stash: show combined diff with "stash show"
 - stash: default listing to "--cc --simplify-combined-diff"
 - add --simplify-combined-diff option
 - pretty: make empty userformats truly empty
 - pretty: treat "--format=" as an empty userformat
 - revision: drop useless string offset when parsing "--pretty"

 Teach "git stash list -p" to DWIM to "git stash list -p --cc", with
 even nicer twist to collapse combined diff from identical two
 parents into a regular diff.


* pr/remotes-in-hashmap (2014-07-30) 1 commit
 - use a hashmap to make remotes faster

 Optimize remotes configuration look-up in a repository with very
 many remotes defined.


* rs/ref-transaction-multi (2014-07-31) 5 commits
 - refs.c: make the *_packed_refs functions static
 - refs.c: make repack_without_refs static
 - remote.c: use a transaction for deleting refs
 - refs.c: write updates to packed refs when a transaction has more than one ref
 - refs.c: move reflog updates into its own function
 (this branch uses rs/ref-transaction, rs/ref-transaction-1, rs/ref-transaction-reflog and rs/ref-transaction-rename.)

 Follow-up on rs/ref-transaction series to use the packed-ref to
 achieve atomicity when multiple refs are involved.


* rs/ref-transaction-rename (2014-07-31) 5 commits
 - refs.c: rollback the lockfile before we die() in repack_without_refs
 - refs.c: update rename_ref to use a transaction
 - refs.c: use packed refs when deleting refs during a transaction
 - refs.c: return error instead of dying when locking fails during transaction
 - refs.c: allow passing raw git_committer_info as email to _update_reflog
 (this branch is used by rs/ref-transaction-multi; uses rs/ref-transaction, rs/ref-transaction-1 and rs/ref-transaction-reflog.)

 Follow-up on rs/ref-transaction series to make renaming a ref
 transactional (i.e. "delete old and create new" should not leave
 an in-between state behind when it fails).


* ta/doc-config (2014-07-30) 1 commit
  (merged to 'next' on 2014-07-31 at ec577fa)
 + add documentation for writing config files

 Will merge to 'master'.


* tf/maint-doc-push (2014-07-31) 1 commit
  (merged to 'next' on 2014-07-31 at 6a8ef70)
 + git-push: fix link in man page

 Will merge to 'master' and later to 'maint'.


* nd/lock-paths-absolute (2014-08-01) 3 commits
 - lockfile.c: store absolute path
 - lockfile.c: remove PATH_MAX limit in resolve_symlink()
 - lockfile.c: remove PATH_MAX limitation (except in resolve_symlink)
 (this branch uses rs/strbuf-getcwd.)


* mm/config-message-i18n (2014-08-01) 1 commit
 - config.c: mark error and warnings strings for translation

--------------------------------------------------
[Stalled]

* jk/tag-contains (2014-06-30) 8 commits
 . perf: add tests for tag --contains
 . tag: use commit_contains
 . commit: provide a fast multi-tip contains function
 . string-list: add pos to iterator callback
 . add functions for memory-efficient bitmaps
 . paint_down_to_common: use prio_queue
 . tag: factor out decision to stream tags
 . tag: allow --sort with -n

 Expecting a reroll.


* ab/add-interactive-show-diff-func-name (2014-05-12) 2 commits
 - SQUASH??? git-add--interactive: Preserve diff heading when splitting hunks
 - git-add--interactive: Preserve diff heading when splitting hunks

 Waiting for a reroll.


* jn/gitweb-utf8-in-links (2014-05-27) 1 commit
 - gitweb: Harden UTF-8 handling in generated links

 $gmane/250758?


* rh/prompt-tests (2014-06-05) 11 commits
 - t9904: new __git_ps1 tests for Zsh
 - test-lib: make it possible to override how test code is eval'd
 - lib-prompt-tests.sh: add variable for string that encodes percent in PS1
 - lib-prompt-tests.sh: put all tests inside a function
 - t9903: move prompt tests to a new lib-prompt-tests.sh file
 - t9903: move PS1 color code variable definitions to lib-bash.sh
 - t9903: include "Bash" in test names via new $shellname var
 - t9903: run pc mode tests again with PS1 expansion disabled
 - t9903: move test name prefix to a separate variable
 - t9903: put the Bash pc mode prompt test cases in a function
 - t9903: remove Zsh test from the suite of Bash prompt tests

 Expecting a reroll to limit the damage to test_eval_; also reported
 to be broken with older zsh that are still in the field ($gmane/251231).


* ss/userdiff-update-csharp-java (2014-06-02) 2 commits
 - userdiff: support Java try keyword
 - userdiff: support C# async methods and correct C# keywords

 Reviews sent; waiting for a response.


* cc/interpret-trailers (2014-05-28) 11 commits
 - Documentation: add documentation for 'git interpret-trailers'
 - trailer: add tests for commands in config file
 - trailer: execute command from 'trailer.<name>.command'
 - trailer: add tests for "git interpret-trailers"
 - trailer: add interpret-trailers command
 - trailer: put all the processing together and print
 - trailer: parse trailers from file or stdin
 - trailer: process command line trailer arguments
 - trailer: read and process config information
 - trailer: process trailers from input message and arguments
 - trailer: add data structures and basic functions

 A new filter to programatically edit the tail end of the commit log
 messages.

 What is the status of this one?  I think I saw reviews by Michael
 but after that I do not recall seeing any updates.


* mh/lockfile (2014-04-15) 25 commits
 . trim_last_path_elm(): replace last_path_elm()
 . resolve_symlink(): take a strbuf parameter
 . resolve_symlink(): use a strbuf for internal scratch space
 . change lock_file::filename into a strbuf
 . commit_lock_file(): use a strbuf to manage temporary space
 . try_merge_strategy(): use a statically-allocated lock_file object
 . try_merge_strategy(): remove redundant lock_file allocation
 . struct lock_file: declare some fields volatile
 . lockfile: avoid transitory invalid states
 . commit_lock_file(): die() if called for unlocked lockfile object
 . commit_lock_file(): inline temporary variable
 . remove_lock_file(): call rollback_lock_file()
 . lock_file(): exit early if lockfile cannot be opened
 . write_packed_entry_fn(): convert cb_data into a (const int *)
 . prepare_index(): declare return value to be (const char *)
 . delete_ref_loose(): don't muck around in the lock_file's filename
 . cache.h: define constants LOCK_SUFFIX and LOCK_SUFFIX_LEN
 . lockfile.c: document the various states of lock_file objects
 . lock_file(): always add lock_file object to lock_file_list
 . hold_lock_file_for_append(): release lock on errors
 . lockfile: unlock file if lockfile permissions cannot be adjusted
 . rollback_lock_file(): set fd to -1
 . rollback_lock_file(): do not clear filename redundantly
 . api-lockfile: expand the documentation
 . unable_to_lock_die(): rename function from unable_to_lock_index_die()

 Ejected from 'pu' to unclutter.
 Expecting a reroll.


* bg/rebase-off-of-previous-branch (2014-04-16) 1 commit
 - git-rebase: print name of rev when using shorthand

 Teach "git rebase -" to report the concrete name of the branch
 (i.e. the previous one).

 But it stops short and does not do the same for "git rebase @{-1}".
 Expecting a reroll.


* tr/merge-recursive-index-only (2014-02-05) 3 commits
 - merge-recursive: -Xindex-only to leave worktree unchanged
 - merge-recursive: internal flag to avoid touching the worktree
 - merge-recursive: remove dead conditional in update_stages()
 (this branch is used by tr/remerge-diff.)


* tr/remerge-diff (2014-02-26) 5 commits
 . log --remerge-diff: show what the conflict resolution changed
 . name-hash: allow dir hashing even when !ignore_case
 . merge-recursive: allow storing conflict hunks in index
 . revision: fold all merge diff variants into an enum merge_diff_mode
 . combine-diff: do not pass revs->dense_combined_merges redundantly
 (this branch uses tr/merge-recursive-index-only.)

 "log -p" output learns a new way to let users inspect a merge
 commit by showing the differences between the automerged result
 with conflicts the person who recorded the merge would have seen
 and the final conflict resolution that was recorded in the merge.

 Needs to be rebased, now kb/fast-hashmap topic is in.


* jk/makefile (2014-02-05) 16 commits
 . FIXUP
 . move LESS/LV pager environment to Makefile
 . Makefile: teach scripts to include make variables
 . FIXUP
 . Makefile: auto-build C strings from make variables
 . Makefile: drop *_SQ variables
 . FIXUP
 . Makefile: add c-quote helper function
 . Makefile: introduce sq function for shell-quoting
 . Makefile: always create files via make-var
 . Makefile: store GIT-* sentinel files in MAKE/
 . Makefile: prefer printf to echo for GIT-*
 . Makefile: use tempfile/mv strategy for GIT-*
 . Makefile: introduce make-var helper function
 . Makefile: fix git-instaweb dependency on gitweb
 . Makefile: drop USE_GETTEXT_SCHEME from GIT-CFLAGS

 Simplify the Makefile rules and macros that exist primarily for
 quoting purposes, and make it easier to robustly express the
 dependency rules.

 Expecting a reroll.


* po/everyday-doc (2014-01-27) 1 commit
 - Make 'git help everyday' work

 This may make the said command to emit something, but the source is
 not meant to be formatted into a manual pages to begin with, and
 also its contents are a bit stale.  It may be a good first step in
 the right direction, but needs more work to at least get the
 mark-up right before public consumption.

 Will hold.


* rb/merge-prepare-commit-msg-hook (2014-01-10) 4 commits
 - merge: drop unused arg from abort_commit method signature
 - merge: make prepare_to_commit responsible for write_merge_state
 - t7505: ensure cleanup after hook blocks merge
 - t7505: add missing &&

 Expose more merge states (e.g. $GIT_DIR/MERGE_MODE) to hooks that
 run during "git merge".  The log message stresses too much on one
 hook, prepare-commit-msg, but it would equally apply to other hooks
 like post-merge, I think.

 Waiting for a reroll.


* jc/graph-post-root-gap (2013-12-30) 3 commits
 - WIP: document what we want at the end
 - graph: remove unused code a bit
 - graph: stuff the current commit into graph->columns[]

 This was primarily a RFH ($gmane/239580).


* tg/perf-lib-test-perf-cleanup (2013-09-19) 2 commits
 - perf-lib: add test_perf_cleanup target
 - perf-lib: split starting the test from the execution

 Add test_perf_cleanup shell function to the perf suite, that allows
 the script writers to define a test with a clean-up action.

 Will hold.


* jc/show-branch (2014-03-24) 5 commits
 - show-branch: use commit slab to represent bitflags of arbitrary width
 - show-branch.c: remove "all_mask"
 - show-branch.c: abstract out "flags" operation
 - show-branch.c: lift all_mask/all_revs to a global static
 - show-branch.c: update comment style

 Waiting for the final step to lift the hard-limit before sending it out.

--------------------------------------------------
[Cooking]

* mm/config-edit-global (2014-07-25) 3 commits
  (merged to 'next' on 2014-07-31 at ecce1c7)
 + commit: advertise config --global --edit on guessed identity
 + home_config_paths(): let the caller ignore xdg path
 + config --global --edit: create a template file if needed

 Start "git config --edit --global" from a skeletal per-user
 configuration file contents, instead of a total blank, when the
 user does not already have any.  This immediately reduces the need
 for a later "Have you forgotten setting core.user?" and we can add
 more to the template as we gain more experience.

 Will cook in 'next'.


* rs/init-no-duplicate-real-path (2014-07-28) 1 commit
  (merged to 'next' on 2014-07-31 at 683112e)
 + init: avoid superfluous real_path() calls

 Will cook in 'next'.


* rs/ref-transaction-reflog (2014-07-23) 15 commits
 - refs.c: allow deleting refs with a broken sha1
 - refs.c: remove lock_any_ref_for_update
 - refs.c: make unlock_ref/close_ref/commit_ref static
 - refs.c: rename log_ref_setup to create_reflog
 - reflog.c: use a reflog transaction when writing during expire
 - refs.c: allow multiple reflog updates during a single transaction
 - refs.c: only write reflog update if msg is non-NULL
 - refs.c: add a flag to allow reflog updates to truncate the log
 - refs.c: add a transaction function to append a reflog entry
 - lockfile.c: make hold_lock_file_for_append preserve meaningful errno
 - refs.c: add a function to append a reflog entry to a fd
 - refs.c: add a new update_type field to ref_update
 - refs.c: rename the transaction functions
 - refs.c: make ref_transaction_delete a wrapper for ref_transaction_update
 - refs.c: make ref_transaction_create a wrapper to ref_transaction_update
 (this branch is used by rs/ref-transaction-multi and rs/ref-transaction-rename; uses rs/ref-transaction and rs/ref-transaction-1.)

 Cover updates to reflog with the same transaction mechanism as used
 for reflog manipulations.


* cb/mergetool-difftool (2014-07-21) 2 commits
 - difftool: don't assume that default sh is sane
 - mergetool: don't require a work tree for --tool-help


* rs/strbuf-getcwd (2014-07-29) 10 commits
  (merged to 'next' on 2014-07-31 at 6edc3bc)
 + use strbuf_add_absolute_path() to add absolute paths
 + abspath: convert absolute_path() to strbuf
 + use xgetcwd() to set $GIT_DIR
 + use xgetcwd() to get the current directory or die
 + wrapper: add xgetcwd()
 + abspath: convert real_path_internal() to strbuf
 + abspath: use strbuf_getcwd() to remember original working directory
 + setup: convert setup_git_directory_gently_1 et al. to strbuf
 + unix-sockets: use strbuf_getcwd()
 + strbuf: add strbuf_getcwd()
 (this branch is used by nd/lock-paths-absolute.)

 Will cook in 'next'.


* jc/not-mingw-cygwin (2014-07-21) 2 commits
 - test prerequisites: enumerate with commas
 - test prerequisites: eradicate NOT_FOO

 We have been using NOT_{MINGW,CYGWIN} test prerequisites long
 before Peff invented support for negated prerequisites e.g. !MINGW
 and we still add more uses of the former.  Convert them to the
 latter to avoid confusion.


* ta/config-set (2014-07-29) 2 commits
 - test-config: add tests for the config_set API
 - add `config_set` API for caching config-like files

 Add in-core caching layer to let us avoid reading the same
 configuration files number of times.


* rs/ref-transaction-1 (2014-07-16) 20 commits
 - refs.c: make delete_ref use a transaction
 - refs.c: make prune_ref use a transaction to delete the ref
 - refs.c: remove lock_ref_sha1
 - refs.c: remove the update_ref_write function
 - refs.c: remove the update_ref_lock function
 - refs.c: make lock_ref_sha1 static
 - walker.c: use ref transaction for ref updates
 - fast-import.c: use a ref transaction when dumping tags
 - receive-pack.c: use a reference transaction for updating the refs
 - refs.c: change update_ref to use a transaction
 - branch.c: use ref transaction for all ref updates
 - fast-import.c: change update_branch to use ref transactions
 - sequencer.c: use ref transactions for all ref updates
 - commit.c: use ref transactions for updates
 - replace.c: use the ref transaction functions for updates
 - tag.c: use ref transactions when doing updates
 - refs.c: add transaction.status and track OPEN/CLOSED/ERROR
 - refs.c: make ref_transaction_begin take an err argument
 - refs.c: update ref_transaction_delete to check for error and return status
 - refs.c: change ref_transaction_create to do error checking and return status
 (this branch is used by rs/ref-transaction, rs/ref-transaction-multi, rs/ref-transaction-reflog and rs/ref-transaction-rename.)

 The second batch of the transactional ref update series.


* jc/reopen-lock-file (2014-07-14) 1 commit
  (merged to 'next' on 2014-07-21 at 8277dc9)
 + lockfile: allow reopening a closed but still locked file

 Needed in the "commit -p" code path to update the cache tree in the
 index (e.g. for dt/cache-tree-repair topic).

 Will cook in 'next'.


* nd/multiple-work-trees (2014-07-17) 31 commits
  (merged to 'next' on 2014-07-17 at a29d310)
 + checkout: don't require a work tree when checking out into a new one
 + git_path(): keep "info/sparse-checkout" per work-tree
 + count-objects: report unused files in $GIT_DIR/repos/...
 + gc: support prune --repos
 + gc: factor out gc.pruneexpire parsing code
 + gc: style change -- no SP before closing parenthesis
 + prune: strategies for linked checkouts
 + checkout: detach if the branch is already checked out elsewhere
 + checkout: clean up half-prepared directories in --to mode
 + checkout: support checking out into a new working directory
 + use new wrapper write_file() for simple file writing
 + wrapper.c: wrapper to open a file, fprintf then close
 + setup.c: support multi-checkout repo setup
 + setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()
 + setup.c: convert check_repository_format_gently to use strbuf
 + setup.c: detect $GIT_COMMON_DIR in is_git_directory()
 + setup.c: convert is_git_directory() to use strbuf
 + git-stash: avoid hardcoding $GIT_DIR/logs/....
 + *.sh: avoid hardcoding $GIT_DIR/hooks/...
 + git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects
 + $GIT_COMMON_DIR: a new environment variable
 + commit: use SEQ_DIR instead of hardcoding "sequencer"
 + fast-import: use git_path() for accessing .git dir instead of get_git_dir()
 + reflog: avoid constructing .lock path with git_path
 + *.sh: respect $GIT_INDEX_FILE
 + git_path(): be aware of file relocation in $GIT_DIR
 + path.c: group git_path(), git_pathdup() and strbuf_git_path() together
 + path.c: rename vsnpath() to do_git_path()
 + git_snpath(): retire and replace with strbuf_git_path()
 + path.c: make get_pathname() call sites return const char *
 + path.c: make get_pathname() return strbuf instead of static buffer
 (this branch is used by nd/multiple-work-trees-1.)

 A replacement for contrib/workdir/git-new-workdir that does not
 rely on symbolic links and make sharing of objects and refs safer
 by making the borrowee and borrowers aware of each other.

 Will cook in 'next'.


* nd/multiple-work-trees-1 (2014-07-29) 8 commits
 - checkout --to: do not touch existing target directory
 - checkout: prefix --to argument properly when cwd is moved
 - environment.c: fix incorrect git_graft_file initialization
 - checkout --to: fix dangling pointers in remove_junk()
 - checkout: no auto-detach if the ref is already checked out
 - prune --repos: fix uninitialized access
 - checkout: no need to call check_linked_checkouts if head_ref is NULL
 - gitrepository-layout.txt: s/ignored/ignored if/
 (this branch uses nd/multiple-work-trees.)

 Continue polishing nd/multiple-work-trees topic in 'next'.


* dt/cache-tree-repair (2014-07-14) 4 commits
  (merged to 'next' on 2014-07-21 at e83db34)
 + cache-tree: Write updated cache-tree after commit
 + cache-tree: subdirectory tests
 + test-dump-cache-tree: invalid trees are not errors
 + cache-tree: create/update cache-tree on checkout

 Add a few more places in "commit" and "checkout" that make sure
 that the cache-tree is fully populated in the index.

 Will cook in 'next'.


* hv/submodule-config (2014-06-30) 4 commits
  (merged to 'next' on 2014-07-17 at 5e0ce45)
 + do not die on error of parsing fetchrecursesubmodules option
 + use new config API for worktree configurations of submodules
 + extract functions for submodule config set and lookup
 + implement submodule config cache for lookup of submodule names

 Will cook in 'next'.


* rs/ref-transaction (2014-07-17) 12 commits
 - refs.c: fix handling of badly named refs
 - refs.c: make write_ref_sha1 static
 - fetch.c: change s_update_ref to use a ref transaction
 - refs.c: propagate any errno==ENOTDIR from _commit back to the callers
 - refs.c: pass a skip list to name_conflict_fn
 - refs.c: call lock_ref_sha1_basic directly from commit
 - refs.c: move the check for valid refname to lock_ref_sha1_basic
 - refs.c: pass NULL as *flags to read_ref_full
 - refs.c: pass the ref log message to _create/delete/update instead of _commit
 - refs.c: add an err argument to delete_ref_loose
 - wrapper.c: add a new function unlink_or_msg
 - wrapper.c: simplify warn_if_unremovable
 (this branch is used by rs/ref-transaction-multi, rs/ref-transaction-reflog and rs/ref-transaction-rename; uses rs/ref-transaction-1.)


* jc/test-lazy-prereq (2014-06-13) 1 commit
 - tests: drop GIT_*_TIMING_TESTS environment variable support

 Test-script clean-up.

 Will hold.


* mt/patch-id-stable (2014-06-10) 1 commit
 - patch-id: change default to stable

 Teaches "git patch-id" to compute the patch ID that does not change
 when the files in a single patch is reordered. As this new algorithm
 is backward incompatible, the last bit to flip it to be the default
 is left out of 'master' for now.

 Will hold.

--------------------------------------------------
[Discarded]

* jh/submodule-tests (2014-04-17) 1 commit
 . t7410: 210 tests for various 'git submodule update' scenarios


* nd/path-max-is-better-than-hardcoded-magic-1024 (2014-07-17) 1 commit
 . abspath.c: use PATH_MAX in real_path_internal()

 rs/strbuf-getcwd topic covers this codepath in a better way.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: What's cooking in git.git (Aug 2014, #01; Fri, 1)
  2014-08-01 22:01 What's cooking in git.git (Aug 2014, #01; Fri, 1) Junio C Hamano
@ 2014-08-06  8:11 ` Jeff King
  2014-08-06 17:12   ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2014-08-06  8:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Fri, Aug 01, 2014 at 03:01:31PM -0700, Junio C Hamano wrote:

> * jk/stash-list-p (2014-07-30) 7 commits
>  - SQUASH??? future-proof, log --cc should imply -p without being told
>  - stash: show combined diff with "stash show"
>  - stash: default listing to "--cc --simplify-combined-diff"
>  - add --simplify-combined-diff option
>  - pretty: make empty userformats truly empty
>  - pretty: treat "--format=" as an empty userformat
>  - revision: drop useless string offset when parsing "--pretty"
> 
>  Teach "git stash list -p" to DWIM to "git stash list -p --cc", with
>  even nicer twist to collapse combined diff from identical two
>  parents into a regular diff.

What do you want to do with this topic?

I think we want to drop the "stash show" patch, based on the discussion
we had.  The first three patches are nominally prep for that final
patch, but actually are things I've often wanted over the years. I'd be
glad if they made it in separately, but there were some compatibility
questions.

As clever as I find the --simplify-combined-diff patch, I think we came
to the conclusion that "--first-parent" is probably the reasonable
choice. It matches "stash show", and it's simple and obvious. Do we just
want a patch to specify "--first-parent" to stash-log? That would make
"-p" just work. The only downside is that there isn't a good way to turn
it off. Is it enough to say "if you want to do something clever, use
git-log"?

Or do we want to scrap the whole thing and try to update the
documentation to make it more clear why "-p" by itself doesn't do
anything?

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: What's cooking in git.git (Aug 2014, #01; Fri, 1)
  2014-08-06  8:11 ` Jeff King
@ 2014-08-06 17:12   ` Junio C Hamano
  2014-08-06 18:35     ` [PATCH] stash: default listing to working-tree diff Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2014-08-06 17:12 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Jeff King <peff@peff.net> writes:

> On Fri, Aug 01, 2014 at 03:01:31PM -0700, Junio C Hamano wrote:
>
>> * jk/stash-list-p (2014-07-30) 7 commits
>>  - SQUASH??? future-proof, log --cc should imply -p without being told
>>  - stash: show combined diff with "stash show"
>>  - stash: default listing to "--cc --simplify-combined-diff"
>>  - add --simplify-combined-diff option
>>  - pretty: make empty userformats truly empty
>>  - pretty: treat "--format=" as an empty userformat
>>  - revision: drop useless string offset when parsing "--pretty"
>> 
>>  Teach "git stash list -p" to DWIM to "git stash list -p --cc", with
>>  even nicer twist to collapse combined diff from identical two
>>  parents into a regular diff.
>
> What do you want to do with this topic?
>
> I think we want to drop the "stash show" patch, based on the discussion
> we had.  The first three patches are nominally prep for that final
> patch, but actually are things I've often wanted over the years. I'd be
> glad if they made it in separately, but there were some compatibility
> questions.

I am not sure what compatibility you are worried about.  The empty
format one looks like a pure bugfix to me, and I agree that they
are good changes regardless of the remainder of the series.

> As clever as I find the --simplify-combined-diff patch, I think we came
> to the conclusion that "--first-parent" is probably the reasonable
> choice. It matches "stash show", and it's simple and obvious. Do we just
> want a patch to specify "--first-parent" to stash-log? That would make
> "-p" just work. The only downside is that there isn't a good way to turn
> it off.

Perhaps we can add --no-first-parent to countermand it?

> Is it enough to say "if you want to do something clever, use
> git-log"?

> Or do we want to scrap the whole thing and try to update the
> documentation to make it more clear why "-p" by itself doesn't do
> anything?

The latter is the most conservative, but it may be too conservative
to be useful ;-).  Unless we stop advertising that "stash list" is a
thin wrapper around "log -g" with options that would be useful to
view the stash, which is a strange ref with useful reflog entries,
the "--first-parent" approach would be the most sensible, I would
say.  If we can dissociate "stash list" from "log" (in other words,
the set of options "stash list" takes does not have anything to do
with the underlying "log", even though both may have "-p" to tell
them to give patches, etc.), it would be a totally different matter,
and it might give us a better future, but I suspect it might be a
bit too late for that.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] stash: default listing to working-tree diff
  2014-08-06 17:12   ` Junio C Hamano
@ 2014-08-06 18:35     ` Jeff King
  2014-08-07 21:39       ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2014-08-06 18:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Wed, Aug 06, 2014 at 10:12:25AM -0700, Junio C Hamano wrote:

> > I think we want to drop the "stash show" patch, based on the discussion
> > we had.  The first three patches are nominally prep for that final
> > patch, but actually are things I've often wanted over the years. I'd be
> > glad if they made it in separately, but there were some compatibility
> > questions.
> 
> I am not sure what compatibility you are worried about.  The empty
> format one looks like a pure bugfix to me, and I agree that they
> are good changes regardless of the remainder of the series.

I was mostly worried that somebody is relying on the weird current
behavior with the blank line. I'm inclined to call it a bugfix, too.

> > As clever as I find the --simplify-combined-diff patch, I think we came
> > to the conclusion that "--first-parent" is probably the reasonable
> > choice. It matches "stash show", and it's simple and obvious. Do we just
> > want a patch to specify "--first-parent" to stash-log? That would make
> > "-p" just work. The only downside is that there isn't a good way to turn
> > it off.
> 
> Perhaps we can add --no-first-parent to countermand it?

I started down that road and then realized that "--first-parent" is not
enough. It is only interesting combined with "-m". But it turns out that
using the two together does exactly what we want, and is overridden
as you would hope with just "--cc".

See the patch below, which I think could replace the top three from
jk/stash-list-p (or really, could replace the whole series, and the
bottom three could go into their own topic).

-- >8 --
Subject: stash: default listing to working-tree diff

When you list stashes, you can provide arbitrary git-log
options to change the display. However, adding just "-p"
does nothing, because each stash is actually a merge commit.

This implementation detail is easy to forget, leading to
confused users who think "-p" is not working. We can make
this easier by defaulting to "--first-parent -m", which will
show the diff against the working tree. This omits the
index portion of the stash entirely, but it's simple and it
matches what "git stash show" provides.

People who are more clueful about stash's true form can use
"--cc" to override the "-m", and the "--first-parent" will
then do nothing. For diffs, it only affects non-combined
diffs, so "--cc" overrides it. And for the traversal, we are
walking the linear reflog anyway, so we do not even care
about the parents.

Signed-off-by: Jeff King <peff@peff.net>
---
 git-stash.sh     |  2 +-
 t/t3903-stash.sh | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/git-stash.sh b/git-stash.sh
index bcc757b..9c1ba8e 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -297,7 +297,7 @@ have_stash () {
 
 list_stash () {
 	have_stash || return 0
-	git log --format="%gd: %gs" -g "$@" $ref_stash --
+	git log --format="%gd: %gs" -g --first-parent -m "$@" $ref_stash --
 }
 
 show_stash () {
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 5b79b21..1e29962 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -685,4 +685,46 @@ test_expect_success 'handle stash specification with spaces' '
 	grep pig file
 '
 
+test_expect_success 'setup stash with index and worktree changes' '
+	git stash clear &&
+	git reset --hard &&
+	echo index >file &&
+	git add file &&
+	echo working >file &&
+	git stash
+'
+
+test_expect_success 'stash list implies --first-parent -m' '
+	cat >expect <<-\EOF &&
+	stash@{0}: WIP on master: b27a2bc subdir
+
+	diff --git a/file b/file
+	index 257cc56..d26b33d 100644
+	--- a/file
+	+++ b/file
+	@@ -1 +1 @@
+	-foo
+	+working
+	EOF
+	git stash list -p >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'stash list --cc shows combined diff' '
+	cat >expect <<-\EOF &&
+	stash@{0}: WIP on master: b27a2bc subdir
+
+	diff --cc file
+	index 257cc56,9015a7a..d26b33d
+	--- a/file
+	+++ b/file
+	@@@ -1,1 -1,1 +1,1 @@@
+	- foo
+	 -index
+	++working
+	EOF
+	git stash list -p --cc >actual &&
+	test_cmp expect actual
+'
+
 test_done
-- 
2.1.0.rc0.286.g5c67d74

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] stash: default listing to working-tree diff
  2014-08-06 18:35     ` [PATCH] stash: default listing to working-tree diff Jeff King
@ 2014-08-07 21:39       ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2014-08-07 21:39 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Jeff King <peff@peff.net> writes:

> See the patch below, which I think could replace the top three from
> jk/stash-list-p (or really, could replace the whole series, and the
> bottom three could go into their own topic).

Sounds sensible.  Let's split those three changes into a separate
topic (jk/pretty-empty-format) and queue this independently.

Thanks.

> -- >8 --
> Subject: stash: default listing to working-tree diff
>
> When you list stashes, you can provide arbitrary git-log
> options to change the display. However, adding just "-p"
> does nothing, because each stash is actually a merge commit.
>
> This implementation detail is easy to forget, leading to
> confused users who think "-p" is not working. We can make
> this easier by defaulting to "--first-parent -m", which will
> show the diff against the working tree. This omits the
> index portion of the stash entirely, but it's simple and it
> matches what "git stash show" provides.
>
> People who are more clueful about stash's true form can use
> "--cc" to override the "-m", and the "--first-parent" will
> then do nothing. For diffs, it only affects non-combined
> diffs, so "--cc" overrides it. And for the traversal, we are
> walking the linear reflog anyway, so we do not even care
> about the parents.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  git-stash.sh     |  2 +-
>  t/t3903-stash.sh | 42 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 43 insertions(+), 1 deletion(-)
>
> diff --git a/git-stash.sh b/git-stash.sh
> index bcc757b..9c1ba8e 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -297,7 +297,7 @@ have_stash () {
>  
>  list_stash () {
>  	have_stash || return 0
> -	git log --format="%gd: %gs" -g "$@" $ref_stash --
> +	git log --format="%gd: %gs" -g --first-parent -m "$@" $ref_stash --
>  }
>  
>  show_stash () {
> diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
> index 5b79b21..1e29962 100755
> --- a/t/t3903-stash.sh
> +++ b/t/t3903-stash.sh
> @@ -685,4 +685,46 @@ test_expect_success 'handle stash specification with spaces' '
>  	grep pig file
>  '
>  
> +test_expect_success 'setup stash with index and worktree changes' '
> +	git stash clear &&
> +	git reset --hard &&
> +	echo index >file &&
> +	git add file &&
> +	echo working >file &&
> +	git stash
> +'
> +
> +test_expect_success 'stash list implies --first-parent -m' '
> +	cat >expect <<-\EOF &&
> +	stash@{0}: WIP on master: b27a2bc subdir
> +
> +	diff --git a/file b/file
> +	index 257cc56..d26b33d 100644
> +	--- a/file
> +	+++ b/file
> +	@@ -1 +1 @@
> +	-foo
> +	+working
> +	EOF
> +	git stash list -p >actual &&
> +	test_cmp expect actual
> +'
> +
> +test_expect_success 'stash list --cc shows combined diff' '
> +	cat >expect <<-\EOF &&
> +	stash@{0}: WIP on master: b27a2bc subdir
> +
> +	diff --cc file
> +	index 257cc56,9015a7a..d26b33d
> +	--- a/file
> +	+++ b/file
> +	@@@ -1,1 -1,1 +1,1 @@@
> +	- foo
> +	 -index
> +	++working
> +	EOF
> +	git stash list -p --cc >actual &&
> +	test_cmp expect actual
> +'
> +
>  test_done

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-07 21:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 22:01 What's cooking in git.git (Aug 2014, #01; Fri, 1) Junio C Hamano
2014-08-06  8:11 ` Jeff King
2014-08-06 17:12   ` Junio C Hamano
2014-08-06 18:35     ` [PATCH] stash: default listing to working-tree diff Jeff King
2014-08-07 21:39       ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.