git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Possible git bug
@ 2013-08-14  4:50 Hugh Davenport
  2013-08-14  5:42 ` Daniel Knittl-Frank
  0 siblings, 1 reply; 15+ messages in thread
From: Hugh Davenport @ 2013-08-14  4:50 UTC (permalink / raw)
  To: git

Hey,

Not sure if this is a bug or not. I commonly am finding myself wanting 
to
remove some recent commits, either all or just a select few. So I use 
rebase
in interactive mode for this. The problem I find is that when I do a 
rebase
and leave no commits to pick (where I would think that this would do the 
same
as a reset --hard) just tells me that there is nothing to be done.

So would that be a bug? Or maybe a feature? I would like it that when 
you do
a rebase and select no commits, it will rebase ontop of the commit you 
chose,
and remove all the commits not shown in the interactive listing (so 
all).

Any ideas are welcome.

Cheers,

Hugh

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH] Document `rebase.forkpoint` in rebase man page
@ 2021-09-16 21:21 Junio C Hamano
  2021-09-16 22:35 ` Possible git bug wesley
  2021-09-16 22:46 ` wesley
  0 siblings, 2 replies; 15+ messages in thread
From: Junio C Hamano @ 2021-09-16 21:21 UTC (permalink / raw)
  To: wesley; +Cc: git, me

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

> wesley@schwengle.net writes:
>
>> From: Wesley Schwengle <wesley@opperschaap.net>
>>
>> The option exists and the rebase behaviour tricked me into thinking
>> there was a bug with git. This will tell people how they can tweak the
>> default behavior.
>
> This tells readers about almost nothing but your frustration.
>
> We, or anybody who will be reading "git log" in 6 months to improve
> the system, will not need to hear it.  Instead we need to understand
>
> what the real problem is, what was wrong in the behaviour, or what
> the expected behaviour was and why the use of the feature was
> inappropriate in the particular case, without which it is impossible
> to understand why this sentence was added when a future developer
> and documenter tries to improve upon this text.

I misspke a bit here.  While hearing only your frustration and
nothing else won't help us much, we do need to understand what
caused your frustration, to avoid frustrating the next user the same
way.  All of the "Instead we need to understand ..." are about that.

> We often do:
>
>   "See also `rebase.forkpoint` in linkgit:git-config[1]."
>
> (for example, there is a reference to linkgit:githooks[5] in the
> same page).

One reason why you didn't find how to tweak the forkpoint feature,
other than giving a command line option to countermand it, is
because this link pointing at the list of configurations, where the
variable is already described, was missing in the doucmentation for
the "rebase" command.

Thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Possible git bug
@ 2021-09-16  3:29 Wesley Schwengle
  2021-09-16  5:37 ` Taylor Blau
  0 siblings, 1 reply; 15+ messages in thread
From: Wesley Schwengle @ 2021-09-16  3:29 UTC (permalink / raw)
  To: git


Hello,

I'm running into a weird issue with git at the moment and I'm wondering 
if this is a bug. I have a small reproduction path:

$ mkdir reproduction
$ cd reproduction
$ git init .
$ echo "commit a" > file.txt
$ git commit -m "First commit" file.txt
$ echo "commit b" >> file.txt
$ git commit -m "Second commit" file.txt

$ git switch -c foo
$ echo "commit c" >> file.txt"
$ git commit -m "Third commit" file.txt
$ git branch --set-upstream-to=master

$ git status
On branch foo
Your branch is ahead of 'master' by 1 commit.

$ git switch master
$ git merge foo
$ git reset --hard HEAD^
$ git switch foo
Switched to branch 'foo'
Your branch is ahead of 'master' by 1 commit.

$ git log --format='%C(yellow)%h%Creset %Cgreen%s%Creset'
5f427e3 Third commit
03ad791 Second commit
411e6d4 First commit

$ git rebase master
$ git status
On branch foo
Your branch is up to date with 'master'.

$ git log --format='%C(yellow)%h%Creset %Cgreen%s%Creset'
03ad791 Second commit
411e6d4 First commit

I do not expect to lose the commits from foo, it seems the ref of master 
doesn't get updated after a reset.

I didn't lose any work because I pushed my work to a remote and can 
still get it from there (and git reflog would also reach my code). It is 
rather surprising to see this kind of behavior.

I'm running:
$ git --version
git version 2.33.0.363.g4c719308ce

But I also got this behavior with the git shipped with Debian:
$ /usr/bin/git --version
git version 2.32.0

Cheers,
Wesley

-- 
Wesley Schwengle
E: wesley@schwengle.net

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Possible git bug
@ 2009-01-17 13:52 Damon LaCrosse
  2009-01-17 15:16 ` Johannes Schindelin
  0 siblings, 1 reply; 15+ messages in thread
From: Damon LaCrosse @ 2009-01-17 13:52 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 66 bytes --]

HiQ,

any chances the attached patch reveals a git bug?

Cheers,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: git-bug.patch --]
[-- Type: text/x-patch, Size: 596 bytes --]

diff -Nru old/git-bug.sh new/git-bug.sh
--- old/git-bug.sh	1970-01-01 01:00:00.000000000 +0100
+++ new/git-bug.sh	2008-09-16 09:52:18.000000000 +0200
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+mkdir bug
+cd bug
+git init-db
+
+echo one > file1
+git add file1
+echo "Bug Test Example" | git commit --all -F -
+
+git checkout -b branch
+echo two >> file1
+echo "Branch modification" | git commit --all -F -
+
+git checkout master
+git mv file1 file2
+
+echo "Master rename" | git commit --all -F -
+
+echo three >> file2
+
+echo "Master modification" | git commit --all -F -
+
+git merge -s recursive branch

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

end of thread, other threads:[~2021-09-16 22:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14  4:50 Possible git bug Hugh Davenport
2013-08-14  5:42 ` Daniel Knittl-Frank
2013-08-14  6:53   ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2021-09-16 21:21 [PATCH] Document `rebase.forkpoint` in rebase man page Junio C Hamano
2021-09-16 22:35 ` Possible git bug wesley
2021-09-16 22:46 ` wesley
2021-09-16  3:29 Wesley Schwengle
2021-09-16  5:37 ` Taylor Blau
2021-09-16 12:07   ` Wesley Schwengle
2021-09-16 12:47     ` wesley
2021-09-16 15:33       ` Junio C Hamano
2021-09-16 19:39         ` Wesley Schwengle
2021-09-16 21:52           ` Junio C Hamano
2021-09-16 22:30             ` Wesley Schwengle
2009-01-17 13:52 Damon LaCrosse
2009-01-17 15:16 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).