* Re: git fetch,git merge and git rebase
From: Alexey Shumkin @ 2011-02-10 7:25 UTC (permalink / raw)
To: git
In-Reply-To: <1297315789338-6010561.post@n2.nabble.com>
> I am new to git .Can someone explain in simple terms what git fetch,git
> merge and git rebase do?..I tried googling but was very confused after going
> thro it.
and also https://git.wiki.kernel.org/index.php/GitFaq
^ permalink raw reply
* Re: git fetch,git merge and git rebase
From: Alexey Shumkin @ 2011-02-10 7:22 UTC (permalink / raw)
To: git
In-Reply-To: <1297315789338-6010561.post@n2.nabble.com>
Akash <bcakashguru <at> gmail.com> writes:
>
>
> Hi,
>
> I am new to git .Can someone explain in simple terms what git fetch,git
> merge and git rebase do?..I tried googling but was very confused after going
> thro it.
>
> Also, can someone prescribe a link which explains git in detail right from
> scratch.
>
RFTM, with all respect ))
http://progit.org/book/
^ permalink raw reply
* git fetch,git merge and git rebase
From: Akash @ 2011-02-10 5:29 UTC (permalink / raw)
To: git
Hi,
I am new to git .Can someone explain in simple terms what git fetch,git
merge and git rebase do?..I tried googling but was very confused after going
thro it.
Also, can someone prescribe a link which explains git in detail right from
scratch.
--
View this message in context: http://git.661346.n2.nabble.com/git-fetch-git-merge-and-git-rebase-tp6010561p6010561.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [PATCH 6/7] tag: support column output with --column
From: Miles Bader @ 2011-02-10 2:54 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: Junio C Hamano, git
In-Reply-To: <AANLkTinHyX+uiO+Oj3N3NAEjbZmE=vbKsA+C+tQ6B-Db@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>> Hmm, is this robbing streaming output from people who do not care about
>> columnar output?
>
> Yes, but tag list is short enough streaming does not really matter. I
> can check if column mode is active there, if it's not, just printf.
...but it's important to note, I think that in many projects the tag
list is at least long enough that columnar output would be hugely
useful...
-miles
--
Custard, n. A vile concoction produced by a malevolent conspiracy of the hen,
the cow, and the cook.
^ permalink raw reply
* Re: "git add -u" broken in git 1.7.4?
From: Junio C Hamano @ 2011-02-10 2:46 UTC (permalink / raw)
To: Jeff King
Cc: Nguyen Thai Ngoc Duy, Junio C Hamano, SZEDER Gábor,
Matthieu Moy, Sebastian Pipping, Git ML
In-Reply-To: <20110210023132.GB5073@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> ls-tree already has --full-tree (and --full-name, which just gives full
> pathnames but still restricts output to files in the current directory).
> ls-files. ls-files has --full-name, but AFAIK needs a matching
> --full-tree.
... and --no-full-tree, if we were to make the default tweakable from the
configuration mechanism for Porcelain commands. The convoluted logic
would go like this:
1. 'git clean' can be made default to the full-tree operation by
setting "porcelain.fullTreeOnNoPathspec = yes";
2. a script may want to defeat random configuration the user may have and
'git clean --full-tree' and 'git clean --no-full-tree' are the ways to
force the semantics it wants;
3. 'git ls-files' will keep the default of cwd-relativeness, but will gain
'git ls-files --full-tree'; naturally people expect --no-full-tree to
work, even though the command will not be affected by the configuration
variable porcelain.fullTreeOnNoPathspec.
^ permalink raw reply
* Re: [PATCH] rebase: use @{upstream} if no upstream specified
From: Martin von Zweigbergk @ 2011-02-10 2:46 UTC (permalink / raw)
To: Junio C Hamano
Cc: Martin von Zweigbergk, git, Yann Dirson, Jonathan Nieder,
Sverre Rabbelier
In-Reply-To: <7voc6k62xq.fsf@alter.siamese.dyndns.org>
On Wed, 9 Feb 2011, Junio C Hamano wrote:
> Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:
>
> > 'git rebase' without arguments is currently not supported. Make it
> > default to 'git rebase @{upstream}'. That is also what 'git pull
> > [--rebase]' defaults to, so it only makes sense that 'git rebase'
> > defaults to the same thing.
>
> Not that I am fundamentally opposed to the proposed change, but the above is
> not a very convincing argument, when the corresponding change to "git merge"
> is just started getting discussed.
There was a little more motivation later in the commit message, like
using it with 'git rebase -i'. I have been using it for a few months
now, and I also find it quite useful e.g. when rebasing all my
branches on top of your master.
>
> On top of what commit does this patch apply, by the way?
On top of the rebase refactoring series I posted a few days ago. See
http://thread.gmane.org/gmane.comp.version-control.git/166161/.
/Martin
^ permalink raw reply
* Re: [PATCH 6/7] tag: support column output with --column
From: Nguyen Thai Ngoc Duy @ 2011-02-10 2:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vvd0sop15.fsf@alter.siamese.dyndns.org>
2011/2/10 Junio C Hamano <gitster@pobox.com>:
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> @@ -52,7 +54,7 @@ static int show_reference(const char *refname, const unsigned char *sha1,
>> }
>>
>> if (!filter->lines) {
>> - printf("%s\n", refname);
>> + string_list_append(&layout.items, refname);
>
> Hmm, is this robbing streaming output from people who do not care about
> columnar output?
Yes, but tag list is short enough streaming does not really matter. I
can check if column mode is active there, if it's not, just printf.
> I tend to agree with others who suggested you to port column to platforms
> that lack it.
The first version of this series created git-column and made a pipe to
git-column when column output is active. I'll resurrect the command
then. Original column does not understand ANSI escape codes for
coloring and mess up column output.
--
Duy
^ permalink raw reply
* Re: "git add -u" broken in git 1.7.4?
From: Jeff King @ 2011-02-10 2:31 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy
Cc: Junio C Hamano, SZEDER Gábor, Matthieu Moy,
Sebastian Pipping, Git ML
In-Reply-To: <AANLkTi=dmqRQqBD2HZfv2x-kxaqrxvSx3r62d09KMP1k@mail.gmail.com>
On Thu, Feb 10, 2011 at 09:24:55AM +0700, Nguyen Thai Ngoc Duy wrote:
> > I don't think it's worth moving ls-files/ls-tree. They're plumbing that
> > people don't use frequently. So the cost of moving them is high (because
> > we are breaking something meant to be scriptable) and the benefit is low
> > (because users don't type them a lot).
>
> No we should not, but we should add --full-tree to
> ls-files/ls-tree/archive. I'd love "ls-files --full-tree
> '*somefile*'".
ls-tree already has --full-tree (and --full-name, which just gives full
pathnames but still restricts output to files in the current directory).
ls-files. ls-files has --full-name, but AFAIK needs a matching
--full-tree.
-Peff
^ permalink raw reply
* What's cooking in git.git (Feb 2011, #03; Wed, 9)
From: Junio C Hamano @ 2011-02-10 2:26 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'.
The 'maint' branch has accumulated enough minor fixes to produce 1.7.4.1,
perhaps by the end of this week.
--------------------------------------------------
[New Topics]
* jh/merge-sans-branch (2011-02-08) 3 commits
- merge: optionally merge from upstream when run without argument
- builtin/merge.c: Add function per_branch_config
- builtin/merge.c: Add setup_merge_commit function
* js/checkout-untracked-symlink (2011-02-05) 2 commits
- (weatherbaloon) needs in-code explanation updates
- Demonstrate breakage: checkout overwrites untracked symlink with directory
* lp/config-vername-check (2011-01-21) 2 commits
- Documentation fixes in git-config
- Sanity-check config variable names
* mz/rerere-remaining (2011-02-07) 1 commit
- mergetool: don't skip modify/remove conflicts
(this branch uses jc/rerere-remaining.)
* nd/hash-object-sanity (2011-02-05) 1 commit
- Make hash-object more robust against malformed objects
--------------------------------------------------
[Graduated to "master"]
* ae/better-template-failure-report (2010-12-18) 1 commit
(merged to 'next' on 2011-02-03 at 3b269c9)
+ Improve error messages when temporary file creation fails
* cb/setup (2010-12-27) 1 commit
(merged to 'next' on 2011-02-03 at 073980f)
+ setup: translate symlinks in filename when using absolute paths
* ef/alias-via-run-command (2011-01-07) 1 commit
(merged to 'next' on 2011-02-03 at 4ce47ce)
+ alias: use run_command api to execute aliases
* jc/fsck-fixes (2011-01-26) 2 commits
(merged to 'next' on 2011-02-03 at 98e1c63)
+ fsck: do not give up too early in fsck_dir()
+ fsck: drop unused parameter from traverse_one_object()
* jc/unpack-trees (2010-12-22) 2 commits
(merged to 'next' on 2011-02-03 at 5bd48f8)
+ unpack_trees(): skip trees that are the same in all input
+ unpack-trees.c: cosmetic fix
* jn/cherry-pick-strategy-option (2010-12-10) 1 commit
(merged to 'next' on 2011-02-03 at 1c10f16)
+ cherry-pick/revert: add support for -X/--strategy-option
* jn/unpack-lstat-failure-report (2011-01-12) 2 commits
(merged to 'next' on 2011-02-03 at 76586d2)
+ unpack-trees: handle lstat failure for existing file
+ unpack-trees: handle lstat failure for existing directory
* rr/fi-import-marks-if-exists (2011-01-15) 1 commit
(merged to 'next' on 2011-02-03 at 8c9d4ce)
+ fast-import: Introduce --import-marks-if-exists
* tr/diff-words-test (2011-01-18) 4 commits
(merged to 'next' on 2011-02-03 at d346665)
+ t4034 (diff --word-diff): add a minimum Perl drier test vector
+ t4034 (diff --word-diff): style suggestions
+ userdiff: simplify word-diff safeguard
+ t4034: bulk verify builtin word regex sanity
* tr/merge-unborn-clobber (2010-08-22) 1 commit
(merged to 'next' on 2011-02-03 at ccfc03d)
+ Exhibit merge bug that clobbers index&WT
--------------------------------------------------
[Stalled]
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
* jc/rename-degrade-cc-to-c (2011-01-06) 3 commits
- diffcore-rename: fall back to -C when -C -C busts the rename limit
- diffcore-rename: record filepair for rename src
- diffcore-rename: refactor "too many candidates" logic
IIRC, this was a weather-baloon "if you wanted to, this may be how you
would do it" without test updates. People who care need to help moving
things forward.
* ab/p4 (2011-01-11) 1 commit
- git-p4: correct indenting and formatting
Lacks sign-off but is trivial.
* tr/maint-branch-no-track-head (2010-12-14) 1 commit
- branch: do not attempt to track HEAD implicitly
Probably needs a re-roll to exclude either (1) any ref outside the
hierarchies for branches (i.e. refs/{heads,remotes}/), or (2) only refs
outside refs/ hierarchies (e.g. HEAD, ORIG_HEAD, ...). The latter feels
safer and saner.
* mz/rebase (2010-12-28) 31 commits
- rebase -i: remove unnecessary state rebase-root
- rebase -i: don't read unused variable preserve_merges
- git-rebase--am: remove unnecessary --3way option
- rebase -m: don't print exit code 2 when merge fails
- rebase -m: remember allow_rerere_autoupdate option
- rebase: remember strategy and strategy options
- rebase: remember verbose option
- rebase: extract code for writing basic state
- rebase: factor out sub command handling
- rebase: make -v a tiny bit more verbose
- rebase -i: align variable names
- rebase: show consistent conflict resolution hint
- rebase: extract am code to new source file
- rebase: extract merge code to new source file
- rebase: remove $branch as synonym for $orig_head
- rebase -i: support --stat
- rebase: factor out call to pre-rebase hook
- rebase: factor out clean work tree check
- rebase: factor out reference parsing
- rebase: reorder validation steps
- rebase -i: remove now unnecessary directory checks
- rebase: factor out command line option processing
- rebase: align variable content
- rebase: align variable names
- rebase: stricter check of standalone sub command
- rebase: act on command line outside parsing loop
- rebase: improve detection of rebase in progress
- rebase: remove unused rebase state 'prev_head'
- rebase: read state outside loop
- rebase: refactor reading of state
- rebase: clearer names for directory variables
Re-roll posted, but I haven't picked it up yet.
* ab/i18n (2010-10-07) 161 commits
- po/de.po: complete German translation
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: use libcharset.h instead of langinfo.h when available
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
It is getting ridiculously painful to keep re-resolving the conflicts with
other topics in flight, even with the help with rerere.
Needs a bit more minor work to get the basic code structure right.
--------------------------------------------------
[Cooking]
* jc/rerere-remaining (2011-01-06) 1 commit
- rerere "remaining"
(this branch is used by mz/rerere-remaining.)
Just a handful of weatherballoon patches without proper tests, in response
to feature/minor fix requests.
* pw/p4 (2011-02-05) 8 commits
- git-p4: support clone --bare
- git-p4: decode p4 wildcard characters
- git-p4: better message for "git-p4 sync" when not cloned
- git-p4: reinterpret confusing p4 message
- git-p4: accommodate new move/delete type in p4
- git-p4: add missing newline in initial import message
- git-p4: fix key error for p4 problem
- git-p4: test script
Will be re-rolled after collecting comments (Petw Wyckoff, 2011-02-07).
* hv/mingw-fs-funnies (2011-02-07) 5 commits
(merged to 'next' on 2011-02-09 at 3d0bb1a)
+ mingw_rmdir: set errno=ENOTEMPTY when appropriate
+ mingw: add fallback for rmdir in case directory is in use
+ mingw: make failures to unlink or move raise a question
+ mingw: work around irregular failures of unlink on windows
+ mingw: move unlink wrapper to mingw.c
Rerolled and seems ready to move forward.
* nd/struct-pathspec (2011-01-31) 22 commits
(merged to 'next' on 2011-02-09 at b1e64ee)
+ t6004: add pathspec globbing test for log family
+ t7810: overlapping pathspecs and depth limit
+ grep: drop pathspec_matches() in favor of tree_entry_interesting()
+ grep: use writable strbuf from caller for grep_tree()
+ grep: use match_pathspec_depth() for cache/worktree grepping
+ grep: convert to use struct pathspec
+ Convert ce_path_match() to use match_pathspec_depth()
+ Convert ce_path_match() to use struct pathspec
+ struct rev_info: convert prune_data to struct pathspec
+ pathspec: add match_pathspec_depth()
+ tree_entry_interesting(): optimize wildcard matching when base is matched
+ tree_entry_interesting(): support wildcard matching
+ tree_entry_interesting(): fix depth limit with overlapping pathspecs
+ tree_entry_interesting(): support depth limit
+ tree_entry_interesting(): refactor into separate smaller functions
+ diff-tree: convert base+baselen to writable strbuf
+ glossary: define pathspec
+ Move tree_entry_interesting() to tree-walk.c and export it
+ tree_entry_interesting(): remove dependency on struct diff_options
+ Convert struct diff_options to use struct pathspec
+ diff-no-index: use diff_tree_setup_paths()
+ Add struct pathspec
(this branch is used by en/object-list-with-pathspec.)
* en/object-list-with-pathspec (2010-09-20) 2 commits
(merged to 'next' on 2011-02-09 at ccf6c6a)
+ Add testcases showing how pathspecs are handled with rev-list --objects
+ Make rev-list --objects work together with pathspecs
(this branch uses nd/struct-pathspec.)
* uk/checkout-ambiguous-ref (2011-02-08) 4 commits
- checkout: rearrange update_refs_for_switch for clarity
- checkout: introduce --detach synonym for "git checkout foo^{commit}"
- checkout: split off a function to peel away branchname arg
(merged to 'next' on 2011-02-03 at 9044724)
+ checkout: fix bug with ambiguous refs
The topic has become about "checkout --detach" ;-).
^ permalink raw reply
* Re: [PATCH] rebase: use @{upstream} if no upstream specified
From: Junio C Hamano @ 2011-02-10 2:25 UTC (permalink / raw)
To: Martin von Zweigbergk; +Cc: git, Yann Dirson, Jonathan Nieder, Sverre Rabbelier
In-Reply-To: <1297302842-11296-1-git-send-email-martin.von.zweigbergk@gmail.com>
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:
> 'git rebase' without arguments is currently not supported. Make it
> default to 'git rebase @{upstream}'. That is also what 'git pull
> [--rebase]' defaults to, so it only makes sense that 'git rebase'
> defaults to the same thing.
Not that I am fundamentally opposed to the proposed change, but the above is
not a very convincing argument, when the corresponding change to "git merge"
is just started getting discussed.
On top of what commit does this patch apply, by the way?
^ permalink raw reply
* Re: "git add -u" broken in git 1.7.4?
From: Nguyen Thai Ngoc Duy @ 2011-02-10 2:24 UTC (permalink / raw)
To: Jeff King
Cc: Junio C Hamano, SZEDER Gábor, Matthieu Moy,
Sebastian Pipping, Git ML
In-Reply-To: <20110209234621.GA12575@sigill.intra.peff.net>
On Thu, Feb 10, 2011 at 6:46 AM, Jeff King <peff@peff.net> wrote:
> Assuming we move from relative to full-tree, I think the possible things
> to move are:
>
> add -u/-A
> archive
> grep
> clean
> ls-files/ls-tree
>
> I don't think it's worth moving ls-files/ls-tree. They're plumbing that
> people don't use frequently. So the cost of moving them is high (because
> we are breaking something meant to be scriptable) and the benefit is low
> (because users don't type them a lot).
No we should not, but we should add --full-tree to
ls-files/ls-tree/archive. I'd love "ls-files --full-tree
'*somefile*'".
--
Duy
^ permalink raw reply
* [PATCH] Move test-* to t/helper/ subdirectory
From: Nguyễn Thái Ngọc Duy @ 2011-02-10 2:14 UTC (permalink / raw)
To: git, Junio C Hamano; +Cc: Nguyễn Thái Ngọc Duy
In-Reply-To: <7vmxm4onwk.fsf@alter.siamese.dyndns.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
.gitignore | 19 ------------
Makefile | 30 ++++++++++----------
t/helper/.gitignore | 19 ++++++++++++
test-chmtime.c => t/helper/test-chmtime.c | 0
test-ctype.c => t/helper/test-ctype.c | 0
test-date.c => t/helper/test-date.c | 0
test-delta.c => t/helper/test-delta.c | 0
.../helper/test-dump-cache-tree.c | 0
test-genrandom.c => t/helper/test-genrandom.c | 0
.../helper/test-index-version.c | 0
test-line-buffer.c => t/helper/test-line-buffer.c | 0
test-match-trees.c => t/helper/test-match-trees.c | 0
test-obj-pool.c => t/helper/test-obj-pool.c | 0
.../helper/test-parse-options.c | 0
test-path-utils.c => t/helper/test-path-utils.c | 0
test-run-command.c => t/helper/test-run-command.c | 0
test-sha1.c => t/helper/test-sha1.c | 0
test-sha1.sh => t/helper/test-sha1.sh | 4 +-
test-sigchain.c => t/helper/test-sigchain.c | 0
test-string-pool.c => t/helper/test-string-pool.c | 0
test-subprocess.c => t/helper/test-subprocess.c | 0
test-svn-fe.c => t/helper/test-svn-fe.c | 0
test-treap.c => t/helper/test-treap.c | 0
t/test-lib.sh | 4 +-
24 files changed, 38 insertions(+), 38 deletions(-)
create mode 100644 t/helper/.gitignore
rename test-chmtime.c => t/helper/test-chmtime.c (100%)
rename test-ctype.c => t/helper/test-ctype.c (100%)
rename test-date.c => t/helper/test-date.c (100%)
rename test-delta.c => t/helper/test-delta.c (100%)
rename test-dump-cache-tree.c => t/helper/test-dump-cache-tree.c (100%)
rename test-genrandom.c => t/helper/test-genrandom.c (100%)
rename test-index-version.c => t/helper/test-index-version.c (100%)
rename test-line-buffer.c => t/helper/test-line-buffer.c (100%)
rename test-match-trees.c => t/helper/test-match-trees.c (100%)
rename test-obj-pool.c => t/helper/test-obj-pool.c (100%)
rename test-parse-options.c => t/helper/test-parse-options.c (100%)
rename test-path-utils.c => t/helper/test-path-utils.c (100%)
rename test-run-command.c => t/helper/test-run-command.c (100%)
rename test-sha1.c => t/helper/test-sha1.c (100%)
rename test-sha1.sh => t/helper/test-sha1.sh (96%)
rename test-sigchain.c => t/helper/test-sigchain.c (100%)
rename test-string-pool.c => t/helper/test-string-pool.c (100%)
rename test-subprocess.c => t/helper/test-subprocess.c (100%)
rename test-svn-fe.c => t/helper/test-svn-fe.c (100%)
rename test-treap.c => t/helper/test-treap.c (100%)
diff --git a/.gitignore b/.gitignore
index 3dd6ef7..a99a216 100644
--- a/.gitignore
+++ b/.gitignore
@@ -161,25 +161,6 @@
/gitweb/GITWEB-BUILD-OPTIONS
/gitweb/gitweb.cgi
/gitweb/static/gitweb.min.*
-/test-chmtime
-/test-ctype
-/test-date
-/test-delta
-/test-dump-cache-tree
-/test-genrandom
-/test-index-version
-/test-line-buffer
-/test-match-trees
-/test-obj-pool
-/test-parse-options
-/test-path-utils
-/test-run-command
-/test-sha1
-/test-sigchain
-/test-string-pool
-/test-subprocess
-/test-svn-fe
-/test-treap
/common-cmds.h
*.tar.gz
*.dsc
diff --git a/Makefile b/Makefile
index 775ee83..e2b3b92 100644
--- a/Makefile
+++ b/Makefile
@@ -436,7 +436,7 @@ TEST_PROGRAMS_NEED_X += test-svn-fe
TEST_PROGRAMS_NEED_X += test-treap
TEST_PROGRAMS_NEED_X += test-index-version
-TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X))
+TEST_PROGRAMS = $(patsubst %,t/helper/%$X,$(TEST_PROGRAMS_NEED_X))
# List built-in command $C whose implementation cmd_$C() is not in
# builtin/$C.o but is linked in as part of some other command.
@@ -1829,7 +1829,7 @@ git.o git.spec \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
: GIT-VERSION-FILE
-TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
+TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS))
GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
git.o
ifndef NO_CURL
@@ -1963,12 +1963,12 @@ xdiff-interface.o $(XDIFF_OBJS): \
xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
-$(VCSSVN_OBJS) $(VCSSVN_TEST_OBJS): $(LIB_H) \
+$(VCSSVN_OBJS) $(patsubst %,t/helper/%,$(VCSSVN_TEST_OBJS)): $(LIB_H) \
vcs-svn/obj_pool.h vcs-svn/trp.h vcs-svn/string_pool.h \
vcs-svn/line_buffer.h vcs-svn/repo_tree.h vcs-svn/fast_export.h \
vcs-svn/svndump.h
-test-svn-fe.o: vcs-svn/svndump.h
+t/helper/test-svn-fe.o: vcs-svn/svndump.h
endif
exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \
@@ -2108,7 +2108,7 @@ bin-wrappers/%: wrap-for-bin.sh
@mkdir -p bin-wrappers
$(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-e 's|@@BUILD_DIR@@|$(shell pwd)|' \
- -e 's|@@PROG@@|$(@F)|' < $< > $@ && \
+ -e 's|@@PROG@@|$(patsubst test-%,t/helper/test-%,$(@F))|' < $< > $@ && \
chmod +x $@
# GNU make supports exporting all variables by "export" without parameters.
@@ -2122,27 +2122,27 @@ export NO_SVN_TESTS
test: all
$(MAKE) -C t/ all
-test-ctype$X: ctype.o
+t/helper/test-ctype$X: ctype.o
-test-date$X: date.o ctype.o
+t/helper/test-date$X: date.o ctype.o
-test-delta$X: diff-delta.o patch-delta.o
+t/helper/test-delta$X: diff-delta.o patch-delta.o
-test-line-buffer$X: vcs-svn/lib.a
+t/helper/test-line-buffer$X: vcs-svn/lib.a
-test-parse-options$X: parse-options.o
+t/helper/test-parse-options$X: parse-options.o
-test-string-pool$X: vcs-svn/lib.a
+t/helper/test-string-pool$X: vcs-svn/lib.a
-test-svn-fe$X: vcs-svn/lib.a
+t/helper/test-svn-fe$X: vcs-svn/lib.a
.PRECIOUS: $(TEST_OBJS)
-test-%$X: test-%.o $(GITLIBS)
+t/helper/test-%$X: t/helper/test-%.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(filter %.a,$^) $(LIBS)
-check-sha1:: test-sha1$X
- ./test-sha1.sh
+check-sha1:: t/helper/test-sha1$X
+ t/helper/test-sha1.sh
check: common-cmds.h
if sparse; \
diff --git a/t/helper/.gitignore b/t/helper/.gitignore
new file mode 100644
index 0000000..8f1b042
--- /dev/null
+++ b/t/helper/.gitignore
@@ -0,0 +1,19 @@
+/test-chmtime
+/test-ctype
+/test-date
+/test-delta
+/test-dump-cache-tree
+/test-genrandom
+/test-index-version
+/test-line-buffer
+/test-match-trees
+/test-obj-pool
+/test-parse-options
+/test-path-utils
+/test-run-command
+/test-sha1
+/test-sigchain
+/test-string-pool
+/test-subprocess
+/test-svn-fe
+/test-treap
diff --git a/test-chmtime.c b/t/helper/test-chmtime.c
similarity index 100%
rename from test-chmtime.c
rename to t/helper/test-chmtime.c
diff --git a/test-ctype.c b/t/helper/test-ctype.c
similarity index 100%
rename from test-ctype.c
rename to t/helper/test-ctype.c
diff --git a/test-date.c b/t/helper/test-date.c
similarity index 100%
rename from test-date.c
rename to t/helper/test-date.c
diff --git a/test-delta.c b/t/helper/test-delta.c
similarity index 100%
rename from test-delta.c
rename to t/helper/test-delta.c
diff --git a/test-dump-cache-tree.c b/t/helper/test-dump-cache-tree.c
similarity index 100%
rename from test-dump-cache-tree.c
rename to t/helper/test-dump-cache-tree.c
diff --git a/test-genrandom.c b/t/helper/test-genrandom.c
similarity index 100%
rename from test-genrandom.c
rename to t/helper/test-genrandom.c
diff --git a/test-index-version.c b/t/helper/test-index-version.c
similarity index 100%
rename from test-index-version.c
rename to t/helper/test-index-version.c
diff --git a/test-line-buffer.c b/t/helper/test-line-buffer.c
similarity index 100%
rename from test-line-buffer.c
rename to t/helper/test-line-buffer.c
diff --git a/test-match-trees.c b/t/helper/test-match-trees.c
similarity index 100%
rename from test-match-trees.c
rename to t/helper/test-match-trees.c
diff --git a/test-obj-pool.c b/t/helper/test-obj-pool.c
similarity index 100%
rename from test-obj-pool.c
rename to t/helper/test-obj-pool.c
diff --git a/test-parse-options.c b/t/helper/test-parse-options.c
similarity index 100%
rename from test-parse-options.c
rename to t/helper/test-parse-options.c
diff --git a/test-path-utils.c b/t/helper/test-path-utils.c
similarity index 100%
rename from test-path-utils.c
rename to t/helper/test-path-utils.c
diff --git a/test-run-command.c b/t/helper/test-run-command.c
similarity index 100%
rename from test-run-command.c
rename to t/helper/test-run-command.c
diff --git a/test-sha1.c b/t/helper/test-sha1.c
similarity index 100%
rename from test-sha1.c
rename to t/helper/test-sha1.c
diff --git a/test-sha1.sh b/t/helper/test-sha1.sh
similarity index 96%
rename from test-sha1.sh
rename to t/helper/test-sha1.sh
index 0f0bc5d..4e691d1 100755
--- a/test-sha1.sh
+++ b/t/helper/test-sha1.sh
@@ -1,7 +1,7 @@
#!/bin/sh
dd if=/dev/zero bs=1048576 count=100 2>/dev/null |
-/usr/bin/time ./test-sha1 >/dev/null
+/usr/bin/time t/helper/test-sha1 >/dev/null
while read expect cnt pfx
do
@@ -11,7 +11,7 @@ do
test -z "$pfx" || echo "$pfx"
dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null |
perl -pe 'y/\000/g/'
- } | ./test-sha1 $cnt
+ } | t/helper/test-sha1 $cnt
`
if test "$expect" = "$actual"
then
diff --git a/test-sigchain.c b/t/helper/test-sigchain.c
similarity index 100%
rename from test-sigchain.c
rename to t/helper/test-sigchain.c
diff --git a/test-string-pool.c b/t/helper/test-string-pool.c
similarity index 100%
rename from test-string-pool.c
rename to t/helper/test-string-pool.c
diff --git a/test-subprocess.c b/t/helper/test-subprocess.c
similarity index 100%
rename from test-subprocess.c
rename to t/helper/test-subprocess.c
diff --git a/test-svn-fe.c b/t/helper/test-svn-fe.c
similarity index 100%
rename from test-svn-fe.c
rename to t/helper/test-svn-fe.c
diff --git a/test-treap.c b/t/helper/test-treap.c
similarity index 100%
rename from test-treap.c
rename to t/helper/test-treap.c
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 0fdc541..eebf7a8 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -984,9 +984,9 @@ then
}
fi
-if ! test -x "$GIT_BUILD_DIR"/test-chmtime; then
+if ! test -x "$GIT_BUILD_DIR"/t/helper/test-chmtime; then
echo >&2 'You need to build test-chmtime:'
- echo >&2 'Run "make test-chmtime" in the source (toplevel) directory'
+ echo >&2 'Run "make t/helper/test-chmtime" in the source (toplevel) directory'
exit 1
fi
--
1.7.4.74.g639db
^ permalink raw reply related
* [PATCH] rebase: use @{upstream} if no upstream specified
From: Martin von Zweigbergk @ 2011-02-10 1:54 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Yann Dirson, Jonathan Nieder, Sverre Rabbelier,
Martin von Zweigbergk
In-Reply-To: <1297125475-19151-1-git-send-email-martin.von.zweigbergk@gmail.com>
'git rebase' without arguments is currently not supported. Make it
default to 'git rebase @{upstream}'. That is also what 'git pull
[--rebase]' defaults to, so it only makes sense that 'git rebase'
defaults to the same thing.
Defaulting to @{upstream} will make it possible to run e.g. 'git
rebase -i' without arguments, which is probably a quite common use
case. It also improves the scenario where you have multiple branches
that rebase against a remote-tracking branch, where you currently have
to choose between the extra network delay of 'git pull' or the
slightly awkward keys to enter 'git rebase @{u}'.
The error reporting when no upstream is configured for the current
branch or when no branch is checked out is reused from git-pull.sh. A
function is extracted into git-parse-remote.sh for this purpose.
Helped-by: Yann Dirson <ydirson@altern.org>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
---
Changes since v1:
* Extracted error reporting shared with git-pull.sh as suggested by
Jonathan.
* Now discards stderr from "git rev-parse -q @{upstream}", since it's
not quite quiet when there is no upstream.
Documentation/config.txt | 2 +-
Documentation/git-rebase.txt | 11 +++++++++--
git-parse-remote.sh | 38 ++++++++++++++++++++++++++++++++++++++
git-pull.sh | 32 ++++----------------------------
git-rebase.sh | 21 +++++++++++++++------
t/t3400-rebase.sh | 27 ++++++++++++++++++---------
6 files changed, 85 insertions(+), 46 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c5e1835..b4e65b8 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -646,7 +646,7 @@ branch.<name>.remote::
branch.<name>.merge::
Defines, together with branch.<name>.remote, the upstream branch
- for the given branch. It tells 'git fetch'/'git pull' which
+ for the given branch. It tells 'git fetch'/'git pull'/'git rebase' which
branch to merge and can also affect 'git push' (see push.default).
When in branch <name>, it tells 'git fetch' the default
refspec to be marked for merging in FETCH_HEAD. The value is
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 96680c8..d3e998d 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git rebase' [-i | --interactive] [options] [--onto <newbase>]
- <upstream> [<branch>]
+ [<upstream>] [<branch>]
'git rebase' [-i | --interactive] [options] --onto <newbase>
--root [<branch>]
@@ -21,6 +21,12 @@ If <branch> is specified, 'git rebase' will perform an automatic
`git checkout <branch>` before doing anything else. Otherwise
it remains on the current branch.
+If <upstream> is not specified, the upstream configured in
+branch.<name>.remote and branch.<name>.merge options will be used; see
+linkgit:git-config[1] for details. If you are currently not on any
+branch or if the current branch does not have a configured upstream,
+the rebase will abort.
+
All changes made by commits in the current branch but that are not
in <upstream> are saved to a temporary area. This is the same set
of commits that would be shown by `git log <upstream>..HEAD` (or
@@ -216,7 +222,8 @@ leave out at most one of A and B, in which case it defaults to HEAD.
<upstream>::
Upstream branch to compare against. May be any valid commit,
- not just an existing branch name.
+ not just an existing branch name. Defaults to the configured
+ upstream for the current branch.
<branch>::
Working branch; defaults to HEAD.
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 1cc2ba6..be17ecb 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -99,3 +99,41 @@ get_remote_merge_branch () {
esac
esac
}
+
+error_on_missing_default_upstream () {
+ cmd="$1"
+ op_type="$2"
+ op_prep="$3"
+ example="$4"
+ branch_name=$(git symbolic-ref -q HEAD)
+ if test -z "$branch_name"
+ then
+ echo "You are not currently on a branch, so I cannot use any
+'branch.<branchname>.merge' in your configuration file.
+Please specify which branch you want to $op_type $op_prep on the command
+line and try again (e.g. '$example').
+See git-${cmd}(1) for details."
+ else
+ echo "You asked me to $cmd without telling me which branch you
+want to $op_type $op_prep, and 'branch.${branch_name#refs/heads/}.merge' in
+your configuration file does not tell me, either. Please
+specify which branch you want to use on the command line and
+try again (e.g. '$example').
+See git-${cmd}(1) for details.
+
+If you often $op_type $op_prep the same branch, you may want to
+use something like the following in your configuration file:
+ [branch \"${branch_name#refs/heads/}\"]
+ remote = <nickname>
+ merge = <remote-ref>"
+ test rebase = "$op_type" &&
+ echo " rebase = true"
+ echo "
+ [remote \"<nickname>\"]
+ url = <url>
+ fetch = <refspec>
+
+See git-config(1) for details."
+ fi
+ exit 1
+}
diff --git a/git-pull.sh b/git-pull.sh
index eb87f49..2cdea26 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -163,34 +163,10 @@ error_on_no_merge_candidates () {
echo "You asked to pull from the remote '$1', but did not specify"
echo "a branch. Because this is not the default configured remote"
echo "for your current branch, you must specify a branch on the command line."
- elif [ -z "$curr_branch" ]; then
- echo "You are not currently on a branch, so I cannot use any"
- echo "'branch.<branchname>.merge' in your configuration file."
- echo "Please specify which remote branch you want to use on the command"
- echo "line and try again (e.g. 'git pull <repository> <refspec>')."
- echo "See git-pull(1) for details."
- elif [ -z "$upstream" ]; then
- echo "You asked me to pull without telling me which branch you"
- echo "want to $op_type $op_prep, and 'branch.${curr_branch}.merge' in"
- echo "your configuration file does not tell me, either. Please"
- echo "specify which branch you want to use on the command line and"
- echo "try again (e.g. 'git pull <repository> <refspec>')."
- echo "See git-pull(1) for details."
- echo
- echo "If you often $op_type $op_prep the same branch, you may want to"
- echo "use something like the following in your configuration file:"
- echo
- echo " [branch \"${curr_branch}\"]"
- echo " remote = <nickname>"
- echo " merge = <remote-ref>"
- test rebase = "$op_type" &&
- echo " rebase = true"
- echo
- echo " [remote \"<nickname>\"]"
- echo " url = <url>"
- echo " fetch = <refspec>"
- echo
- echo "See git-config(1) for details."
+ elif [ -z "$curr_branch" -o -z "$upstream" ]; then
+ . git-parse-remote
+ error_on_missing_default_upstream "pull" $op_type $op_prep \
+ "git pull <repository> <refspec>"
else
echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
echo "from the remote, but no such ref was fetched."
diff --git a/git-rebase.sh b/git-rebase.sh
index be9ec2a..a040ab5 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2005 Junio C Hamano.
#
-USAGE='[--interactive | -i] [-v] [--force-rebase | -f] [--no-ff] [--onto <newbase>] (<upstream>|--root) [<branch>] [--quiet | -q]'
+USAGE='[--interactive | -i] [-v] [--force-rebase | -f] [--no-ff] [--onto <newbase>] [<upstream>|--root] [<branch>] [--quiet | -q]'
LONG_USAGE='git-rebase replaces <branch> with a new branch of the
same name. When the --onto option is provided the new branch starts
out with a HEAD equal to <newbase>, otherwise it is equal to <upstream>
@@ -345,8 +345,6 @@ and run me again. I am stopping in case you still have something
valuable there.'
fi
-test $# -eq 0 && test -z "$rebase_root" && usage
-
if test -n "$interactive_rebase"
then
type=interactive
@@ -362,9 +360,20 @@ fi
if test -z "$rebase_root"
then
- # The upstream head must be given. Make sure it is valid.
- upstream_name="$1"
- shift
+ case "$#" in
+ 0)
+ if ! upstream_name=$(git rev-parse --symbolic-full-name \
+ --verify -q @{upstream} 2>/dev/null)
+ then
+ . git-parse-remote
+ error_on_missing_default_upstream "rebase" "rebase" \
+ "against" "git rebase <upstream branch>"
+ fi
+ ;;
+ *) upstream_name="$1"
+ shift
+ ;;
+ esac
upstream=`git rev-parse --verify "${upstream_name}^0"` ||
die "invalid upstream $upstream_name"
upstream_arg="$upstream_name"
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 349eebd..6eaecec 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -158,15 +158,24 @@ test_expect_success 'Show verbose error when HEAD could not be detached' '
'
rm -f B
-test_expect_success 'dump usage when upstream arg is missing' '
- git checkout -b usage topic &&
- test_must_fail git rebase 2>error1 &&
- grep "[Uu]sage" error1 &&
- test_must_fail git rebase --abort 2>error2 &&
- grep "No rebase in progress" error2 &&
- test_must_fail git rebase --onto master 2>error3 &&
- grep "[Uu]sage" error3 &&
- ! grep "can.t shift" error3
+test_expect_success 'fail when upstream arg is missing and not on branch' '
+ git checkout topic &&
+ test_must_fail git rebase >output.out &&
+ grep "You are not currently on a branch" output.out
+'
+
+test_expect_success 'fail when upstream arg is missing and not configured' '
+ git checkout -b no-config topic &&
+ test_must_fail git rebase >output.out &&
+ grep "branch.no-config.merge" output.out
+'
+
+test_expect_success 'default to @{upstream} when upstream arg is missing' '
+ git checkout -b default topic &&
+ git config branch.default.remote .
+ git config branch.default.merge refs/heads/master
+ git rebase &&
+ test "$(git rev-parse default~1)" = "$(git rev-parse master)"
'
test_expect_success 'rebase -q is quiet' '
--
1.7.4.rc2.33.g8a14f
^ permalink raw reply related
* Re: [PATCH] rebase: use @{upstream} if no upstream specified
From: Martin von Zweigbergk @ 2011-02-10 1:15 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Martin von Zweigbergk, Sverre Rabbelier, git, Junio C Hamano,
Yann Dirson
In-Reply-To: <20110209041737.GD24346@elie>
On Tue, 8 Feb 2011, Jonathan Nieder wrote:
> Martin von Zweigbergk wrote:
>
> > Changes to the text compared to before:
> >
> > * "remote branch" became "upstream branch", even for git pull
>
> Sensible for pull --rebase. I'm not so sure about plain pull --- what
> if I am upstream and pulling from downstream?
>
> > * "You asked me to pull" became "You asked me to merge" or "You asked
> > me to rebase", even for git pull
>
> "To pull" would be clearer if the reader is new and unfamiliar with
> the details.
>
> > * Now printed to stderr, because I simply didn't think about it. Good
> > or bad?
>
> If this were a new message, I'd say stderr is better.
>
> As is, the change to stderr seems relatively harmless, though I haven't
> thought about it deeply. But a part of me likes to see functional
> changes isolated in separate commits to make tracking down bugs a
> little easier.
The patch below should address all of the above. See how you like the
new wording. The patch applies on top of the previous one to make the
changes clear. I will send a re-roll with all three patches squashed
soon as well.
Note that this patch makes the test cases introduced in the original
patch fail because of the error messages from 'git rebase' are now
written to stdout. I will of course fix that in the re-roll.
Thanks for reviewing.
/Martin
-- 8< --
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index ff58d5b..be17ecb 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -101,25 +101,25 @@ get_remote_merge_branch () {
}
error_on_missing_default_upstream () {
- op_type="$1"
- op_prep="$2"
- example="$3"
- documentation="$4"
+ cmd="$1"
+ op_type="$2"
+ op_prep="$3"
+ example="$4"
branch_name=$(git symbolic-ref -q HEAD)
if test -z "$branch_name"
then
- die "You are not currently on a branch, so I cannot use any
+ echo "You are not currently on a branch, so I cannot use any
'branch.<branchname>.merge' in your configuration file.
-Please specify which upstream branch you want to use on the command
+Please specify which branch you want to $op_type $op_prep on the command
line and try again (e.g. '$example').
-See $documentation for details."
+See git-${cmd}(1) for details."
else
- echo &2> "You asked me to $op_type without telling me which branch you
+ echo "You asked me to $cmd without telling me which branch you
want to $op_type $op_prep, and 'branch.${branch_name#refs/heads/}.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. '$example').
-See $documentation for details.
+See git-${cmd}(1) for details.
If you often $op_type $op_prep the same branch, you may want to
use something like the following in your configuration file:
@@ -127,12 +127,13 @@ use something like the following in your configuration file:
remote = <nickname>
merge = <remote-ref>"
test rebase = "$op_type" &&
- echo &2> " rebase = true"
- die "
+ echo " rebase = true"
+ echo "
[remote \"<nickname>\"]
url = <url>
fetch = <refspec>
See git-config(1) for details."
fi
+ exit 1
}
diff --git a/git-pull.sh b/git-pull.sh
index 8ec1d3d..2cdea26 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -165,8 +165,8 @@ error_on_no_merge_candidates () {
echo "for your current branch, you must specify a branch on the command line."
elif [ -z "$curr_branch" -o -z "$upstream" ]; then
. git-parse-remote
- error_on_missing_default_upstream $op_type $op_prep \
- "git pull <repository> <refspec>" "git-pull(1)"
+ error_on_missing_default_upstream "pull" $op_type $op_prep \
+ "git pull <repository> <refspec>"
else
echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
echo "from the remote, but no such ref was fetched."
diff --git a/git-rebase.sh b/git-rebase.sh
index 8b39cab..cff7aaa 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -366,8 +366,8 @@ then
--verify -q @{upstream})
then
. git-parse-remote
- error_on_missing_default_upstream "rebase" "against" \
- "git rebase <upstream branch>" "git-rebase(1)"
+ error_on_missing_default_upstream "rebase" "rebase" \
+ "against" "git rebase <upstream branch>"
fi
;;
*) upstream_name="$1"
^ permalink raw reply related
* Data stream error (incorrect header check)
From: Luben Tuikov @ 2011-02-10 0:54 UTC (permalink / raw)
To: git, Junio C Hamano
The repo is linux-2.6.
I get this when doing git log, git annotate, etc:
error: inflate: data stream error (incorrect header check)
error: failed to read object d5e57db2bfd773611e2b77b4bbe6d89ba8449b45 at offset
fatal: object d5e57db2bfd773611e2b77b4bbe6d89ba8449b45 is corrupted
What's the best way to fix this without cloning new and fetching local heads over to the new repo?
I'd like to fix this in the current repo I'm using.
Thanks,
Luben
^ permalink raw reply
* Re: [PATCH] request-pull: Include newline in output
From: Junio C Hamano @ 2011-02-10 0:00 UTC (permalink / raw)
To: Michael Witten; +Cc: Junio C Hamano, git
In-Reply-To: <4d531707.9104df0a.4da1.386e@mx.google.com>
Michael Witten <mfwitten@gmail.com> writes:
> On Wed, 09 Feb 2011 13:54:04 -0800, Junio C Hamano wrote:
>> Michael Witten <mfwitten@gmail.com> writes:
>>
>>> Date: Tue, 9 Feb 2011 02:17:47 +0000
>>
>> WTH?
>
> Woops! I typed that by hand...
Please don't. We'll pick the dates up from your e-mail.
^ permalink raw reply
* Re: [PATCH] Demonstrate breakage: checkout overwrites untracked symlink with directory
From: Junio C Hamano @ 2011-02-09 23:48 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: Johannes Sixt, git
In-Reply-To: <20110205183351.GA25717@localhost>
Clemens Buchacher <drizzd@aon.at> writes:
> diff --git a/symlinks.c b/symlinks.c
> index 3cacebd..034943b 100644
> --- a/symlinks.c
> +++ b/symlinks.c
> @@ -223,7 +223,7 @@ int check_leading_path(const char *name, int len)
> int flags;
> int match_len = lstat_cache_matchlen(cache, name, len, &flags,
> FL_SYMLINK|FL_NOENT|FL_DIR, USE_ONLY_LSTAT);
> - if (flags & (FL_SYMLINK|FL_NOENT))
> + if (flags & FL_NOENT)
> return 0;
> else if (flags & FL_DIR)
> return -1;
This function used to be named has-symlink-or-noent-leading-path before
f66caaf (do not overwrite files in leading path, 2010-10-09) and was used
to check for exactly that condition. For example, verify_absent_1() used
it to verify that a path A/B/C/D is not on the filesystem (e.g. in
preparation for checking it out) by making sure that none of A, A/B, or
A/B/C exists -- or is an untracked symlink. If one of them is a symlink
leading elsewhere, even if lstat("A/B/C/D") said the path exists, A/B/C/D
is not something we have in the work tree, and we decide that we can check
out the path by possibly removing intermediate symbolic link and running
mkdir.
Now you are changing the semantics of the function, so that we cannot
clobber intermediate symbolic links when we check out a path. It may
probably be a good change.
Can we rename this function to fix the naming regression introduced in
f66caaf, by the way? "check_leading_path()" is a horrible name for a
function that takes some parameters and returns a boolean, as the boolness
of the function already says enough that it is about "check", giving the
first part of the name 0-bit of information, and the remainder of the name
doesn't say much either: what aspect of leading-path is the function
about? Should the pathcomponents exist, should they not exist, why should
the caller care?
A name that explains for what purpose the caller is expected to call it is
probably the best kind of name. As long as the purpose does not change,
even though the implementation and the semantics are changed later, the
name can stay the same without losing its meaning. The second best kind
is a name that explains what it does. The old name of this function was
of this kind, until f66caaf renamed it to a meaningless name.
Perhaps can-clobber-to-checkout would be a good candidate.
^ permalink raw reply
* Re: "git add -u" broken in git 1.7.4?
From: Jeff King @ 2011-02-09 23:46 UTC (permalink / raw)
To: Junio C Hamano; +Cc: SZEDER Gábor, Matthieu Moy, Sebastian Pipping, Git ML
In-Reply-To: <7vipwsomq8.fsf@alter.siamese.dyndns.org>
On Wed, Feb 09, 2011 at 02:40:47PM -0800, Junio C Hamano wrote:
> > The most compelling I have seen is "you tend to notice accidental
> > full-tree sooner than accidental relative behavior". Which you mentioned
> > in your email.
>
> Hmph. You earlier mentioned "oops, I just pushed this commit and it turns
> out that I screwed up "git add" five minutes ago and it only had half of
> the files I intended" problem, but "oops, I just pushed this commit and it
> turns out that I screwed up "git add" five minutes ago and it had more
> changes than I intended" problem would be equally annoying, and I don't
> think one is inherently more likely to be noticed than the other; IOW, it
> is not compelling, but is just an arbitrary and a biased observation, no?
Yeah, thinking on it more, it is not so much that you notice sooner[1],
as the behavior may be less destructive when you do notice. That is,
accidentally adding too much has put things into the object db.
Accidentally not adding enough means your changes are susceptible to
"git reset --hard" or other destructive actions.
[1] I seem to remember this argument about noticing sooner coming up in
previous discussions, and so I was taking it for granted. But thinking
on it, I can't really come up with a solid reason why one might notice
errors sooner in full tree rather than relative behavior.
> Can somebody volunteer to come up with a comprehensive list of operations
> that will change their behaviour when we switch to "full-tree without
> pathspec" semantics? We mentioned "grep" and "add -u" already.
I went through the whole list of "git help -a" and considered each
command. Quite a few don't take pathspecs, or would be very odd to be
not full-tree (e.g., read-tree reads the whole tree, not just some
subset based on where you are in the project. Anything else would be
kind of insane). I omitted those. If you don't see something in this
list, it's either because I thought it was irrelevant, or I just missed
it going through the list; feel free to mention more.
I think everything which takes a pathspec takes it relative to the
current directory. So we are really just considering the behavior when
_no_ pathspecs are provided.
The current behavior is:
add: error (and suggest "git add .")
add -u: relative
add -A: relative
add -i: full-tree
add -p: full-tree
archive: relative
checkout: full-tree (e.g., "git checkout -f")[1]
checkout-index: n/a (only checks out arguments)
clean: relative
commit -a: full-tree[2]
diff: full-tree
diff-files: full-tree
grep: relative
ls-files: relative
ls-tree: relative[3]
status: shows full-tree, relative by default, absolute
with status.relativePaths
reset --hard: full-tree[4]
log/show/etc: full-tree[5]
blame: error[6]
Notes:
[1] checkout being full-tree without pathspecs is mostly due to "git
checkout" meaning "switch to this branch" and not "checkout some part of
the index". So naturally it is a full-tree operation.
[2] The inconsistency in "git commit -a" versus "git add -u" is to me
one of the worst, as I think it is a useful mental model to think of
"commit -a" as "add -u; commit".
[3] I can understand ls-files being relative, though I don't agree with
it. But ls-tree looking at a relative subset of the tree is just
insane (you were the one who pointed this out to me last time this
subject came up, too).
[4] I think reset --hard is just a tree operation, since it is "set HEAD
to this ref, check it out into the index, _and_ reset the worktree
to match". So obviously it should be full-tree. But I think a common
mental model, especially when resetting to HEAD implicitly, is that
it is about "reset my working tree to the HEAD state". So I included
it in this list.
[5] Revision traversal is not about the worktree at all, so it has
always been about the full project. I don't think there's any
argument there, but I put it in the list as a contrast to ls-tree,
to which the same argument should apply.
[6] Blame obviously does nothing without a path right now. In theory it
could eventually grow whole-directory blame. In that case, I would
expect it to be full-tree (and "git blame ." would do what you
want).
Assuming we move from relative to full-tree, I think the possible things
to move are:
add -u/-A
archive
grep
clean
ls-files/ls-tree
I don't think it's worth moving ls-files/ls-tree. They're plumbing that
people don't use frequently. So the cost of moving them is high (because
we are breaking something meant to be scriptable) and the benefit is low
(because users don't type them a lot).
Obviously add and grep are the two that people have talked about. The
archive behavior surprised me, and I would think it should be full-tree
by default. But it is sort of plumbing-ish, in that people have probably
scripted around and people _don't_ tend to create archives a lot. So it
may fall into the same category as ls-files/ls-tree.
That leaves clean. I would say from a consistency standpoint that it
should go full-tree to match the other commands. But it is one of the
most destructive commands, and making it full-tree makes it easier to
accidentally delete, instead of accidentally fail to delete. So that
makes me hesitate to switch it to full-tree behavior (though a "clean
reflog" would be a pretty cool feature in general).
So depending on your view of the above, it may just be "add -u/-A" and
"grep" that are worth switching.
-Peff
^ permalink raw reply
* Re: [PATCH] correct type of EMPTY_TREE_SHA1_BIN
From: Junio C Hamano @ 2011-02-09 23:33 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Nguyễn Thái Ngọc Duy, git, Ilari Liusvaara,
Jakub Narebski, Dmitry S. Kravtsov, Shawn Pearce
In-Reply-To: <20110207081727.GB2736@elie>
Jonathan Nieder <jrnieder@gmail.com> writes:
> Junio C Hamano wrote:
>
>>> --- a/cache-tree.c
>>> +++ b/cache-tree.c
>>> @@ -621,9 +621,18 @@ static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree)
>>> struct tree *subtree = lookup_tree(entry.sha1);
>>> if (!subtree->object.parsed)
>>> parse_tree(subtree);
>>> + if (!hashcmp(entry.sha1, (unsigned char *)EMPTY_TREE_SHA1_BIN)) {
>>> + warning("empty tree detected! Will be removed in new commits");
>>> + cnt = -1;
>>> + break;
>>> + }
>>
>> You shouldn't need the cast (if you did, then hashcmp() macro should be
>> fixed so that you don't need to).
>
> Isn't this a bug in the definition of EMPTY_TREE_SHA1_BIN rather than
> the signature of hashcmp?
Yeah, you are right.
^ permalink raw reply
* Re: [PATCH v3 2/3] Add function per_branch_config.
From: Junio C Hamano @ 2011-02-09 23:27 UTC (permalink / raw)
To: Jared Hance; +Cc: git
In-Reply-To: <1297211028-14382-3-git-send-email-jaredhance@gmail.com>
Jared Hance <jaredhance@gmail.com> writes:
> Adds a configuration function to be filled up more in the next patch.
Again, "to be filled up more" is not the primary purpose of the new
function that was refactored from the existing one. State what it does,
and what it is for instead, perhaps like...
Split a part of the configuration callback into a separate function
to handle per-branch configuration.
^ permalink raw reply
* Re: [PATCH v3 1/3] Add setup_merge_commit function to merge/builtin.c.
From: Junio C Hamano @ 2011-02-09 23:24 UTC (permalink / raw)
To: Jared Hance; +Cc: git
In-Reply-To: <1297211028-14382-2-git-send-email-jaredhance@gmail.com>
Jared Hance <jaredhance@gmail.com> writes:
> Subject: Re: [PATCH v3 1/3] Add setup_merge_commit function to merge/builtin.c.
Please spell the name of the file you are touching correctly ;-).
Subject: builtin/merge.c: Add setup_merge_commit function
> Adds a new function that will be used in a later patch as well as the
> current code to reduce redundancy.
Redandunt. If you say "add", we know the function is "new" ;-)
State what that function does instead of a vague "reduce redundancy",
perhaps like...
Refactor the loop to parse list of commits given from the command
line into a separate helper function.
The patch itself looks good.
Thanks.
^ permalink raw reply
* Re: [PATCH 2/2] fast-import: introduce "feature notes" command
From: Sverre Rabbelier @ 2011-02-09 23:06 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Thomas Rast, git, Johan Herland, Ramkumar Ramachandra,
Shawn O. Pearce, Sam Vilain, Junio C Hamano
In-Reply-To: <20110209224357.GB17128@elie>
Heya,
On Wed, Feb 9, 2011 at 23:43, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Improved-by: Thomas Rast <trast@student.ethz.ch>
> Improved-by: Sverre Rabbelier <srabbelier@gmail.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked as well. Thanks for backporting this!
--
Cheers,
Sverre Rabbelier
^ permalink raw reply
* [PATCH 2/2] fast-import: introduce "feature notes" command
From: Jonathan Nieder @ 2011-02-09 22:43 UTC (permalink / raw)
To: Sverre Rabbelier
Cc: Thomas Rast, git, Johan Herland, Ramkumar Ramachandra,
Shawn O. Pearce, Sam Vilain, Junio C Hamano
In-Reply-To: <20110209214638.GA16716@elie>
Here is a 'feature' command for streams to use to require support for
the notemodify (N) command.
When the 'feature' facility was introduced (v1.7.0-rc0~95^2~4,
2009-12-04), the notes import feature was old news (v1.6.6-rc0~21^2~8,
2009-10-09) and it was not obvious it deserved to be a named feature.
But now that is clear, since all major non-git fast-import backends
lack support for it.
Details: on git version with this patch applied, any "feature notes"
command in the features/options section at the beginning of a stream
will be treated as a no-op. On fast-import implementations without
the feature (and older git versions), the command instead errors out
with a message like
This version of fast-import does not support feature notes.
So by declaring use of notes at the beginning of a stream, frontends
can avoid wasting time and other resources when the backend does not
support notes. (This would be especially important for backends that
do not support rewinding history after a botched import.)
Improved-by: Thomas Rast <trast@student.ethz.ch>
Improved-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Documentation/git-fast-import.txt | 6 ++++++
fast-import.c | 2 ++
t/t9301-fast-import-notes.sh | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 3bf04e3..becee8b 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -898,6 +898,12 @@ import-marks::
second, an --import-marks= command-line option overrides
any "feature import-marks" command in the stream.
+notes::
+ Require that the backend support the 'notemodify' (N)
+ subcommand to the 'commit' command.
+ Versions of fast-import not supporting notes will exit
+ with a message indicating so.
+
`option`
~~~~~~~~
Processes the specified option so that git fast-import behaves in a
diff --git a/fast-import.c b/fast-import.c
index 74f08bd..ff56ea2 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2821,6 +2821,8 @@ static int parse_one_feature(const char *feature, int from_stream)
relative_marks_paths = 0;
} else if (!prefixcmp(feature, "force")) {
force_update = 1;
+ } else if (!strcmp(feature, "notes")) {
+ ; /* do nothing; we have the feature */
} else {
return 0;
}
diff --git a/t/t9301-fast-import-notes.sh b/t/t9301-fast-import-notes.sh
index a5c99d8..164edf0 100755
--- a/t/t9301-fast-import-notes.sh
+++ b/t/t9301-fast-import-notes.sh
@@ -120,6 +120,7 @@ test_expect_success 'add notes with simple M command' '
test_tick
cat >input <<INPUT_END
+feature notes
commit refs/notes/test
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
--
1.7.4
^ permalink raw reply related
* [PATCH 1/2] fast-import: clarify documentation of "feature" command
From: Jonathan Nieder @ 2011-02-09 22:43 UTC (permalink / raw)
To: Sverre Rabbelier
Cc: Thomas Rast, git, Johan Herland, Ramkumar Ramachandra,
Shawn O. Pearce, Sam Vilain, Junio C Hamano
In-Reply-To: <20110209214638.GA16716@elie>
Date: Sun, 28 Nov 2010 13:43:57 -0600
The "feature" command allows streams to specify options for the import
that must not be ignored. Logically, they are part of the stream,
even though technically most supported features are synonyms to
command-line options.
Make this more obvious by being more explicit about how the analogy
between most "feature" commands and command-line options works. Treat
the feature (import-marks) that does not fit this analogy separately.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Just a cherry-pick.
Documentation/git-fast-import.txt | 33 +++++++++++++++------------------
1 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 19082b0..3bf04e3 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -878,28 +878,25 @@ Require that fast-import supports the specified feature, or abort if
it does not.
....
- 'feature' SP <feature> LF
+ 'feature' SP <feature> ('=' <argument>)? LF
....
-The <feature> part of the command may be any string matching
-^[a-zA-Z][a-zA-Z-]*$ and should be understood by fast-import.
+The <feature> part of the command may be any one of the following:
-Feature work identical as their option counterparts with the
-exception of the import-marks feature, see below.
+date-format::
+export-marks::
+relative-marks::
+no-relative-marks::
+force::
+ Act as though the corresponding command-line option with
+ a leading '--' was passed on the command line
+ (see OPTIONS, above).
-The following features are currently supported:
-
-* date-format
-* import-marks
-* export-marks
-* relative-marks
-* no-relative-marks
-* force
-
-The import-marks behaves differently from when it is specified as
-commandline option in that only one "feature import-marks" is allowed
-per stream. Also, any --import-marks= specified on the commandline
-will override those from the stream (if any).
+import-marks::
+ Like --import-marks except in two respects: first, only one
+ "feature import-marks" command is allowed per stream;
+ second, an --import-marks= command-line option overrides
+ any "feature import-marks" command in the stream.
`option`
~~~~~~~~
--
1.7.4
^ permalink raw reply related
* Re: "git add -u" broken in git 1.7.4?
From: Junio C Hamano @ 2011-02-09 22:40 UTC (permalink / raw)
To: Jeff King; +Cc: SZEDER Gábor, Matthieu Moy, Sebastian Pipping, Git ML
In-Reply-To: <20110209210312.GB2083@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> The most compelling I have seen is "you tend to notice accidental
> full-tree sooner than accidental relative behavior". Which you mentioned
> in your email.
Hmph. You earlier mentioned "oops, I just pushed this commit and it turns
out that I screwed up "git add" five minutes ago and it only had half of
the files I intended" problem, but "oops, I just pushed this commit and it
turns out that I screwed up "git add" five minutes ago and it had more
changes than I intended" problem would be equally annoying, and I don't
think one is inherently more likely to be noticed than the other; IOW, it
is not compelling, but is just an arbitrary and a biased observation, no?
The most compelling, especially if we _were_ designing from scratch to
make things consistent across the command set, would be "limiting to cwd
with single dot is a lot easier to type than counting ../, using / to mean
the root of the working tree is confusing, and saying --full-tree is
annoying". I fully agree with that.
Can somebody volunteer to come up with a comprehensive list of operations
that will change their behaviour when we switch to "full-tree without
pathspec" semantics? We mentioned "grep" and "add -u" already.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox